🇰🇷 한글 설명
aws-cdk-lib 2.245.0 이전 버전(Windows에서는 2.246.0 이전)의 NodejsFunction 로컬 번들링 파이프라인에서 OS 명령어 주입 취약점이 발견되었습니다. 공격자가 externalModules, define, loader, inject, esbuildArgs 등 번들링 속성 값을 제어하고 셸 메타문자를 삽입하면 CDK 도구체인이 실행되는 호스트에서 임의 명령을 실행할 수 있습니다. 이 취약점은 CDK 애플리케이션에서 해당 번들링 속성 값을 공격자가 제어할 수 있어야 악용 가능합니다.
💡 쉬운 설명
AWS CDK로 서버리스 함수를 빌드할 때 사용하는 설정값에 악의적인 문자가 섞이면, 빌드를 실행하는 컴퓨터에서 공격자가 원하는 명령을 실행할 수 있습니다. 설정값을 외부 입력으로 받는 경우 특히 위험하므로 라이브러리를 업데이트해야 합니다.
🇺🇸 원문 (English)
OS command injection in the NodejsFunction local bundling pipeline in aws-cdk-lib before 2.245.0 (2.246.0 on Windows) might allow an actor who controls the value of one or more bundling properties (externalModules, define, loader, inject, or esbuildArgs) to execute arbitrary commands on the host running the CDK toolchain via injected shell metacharacters. This issue requires the threat actor to control the value of one or more of the affected bundling properties in the CDK application.
To remediate this issue, users should upgrade to aws-cdk-lib 2.245.0 (2.246.0 on Windows) or later.
📍 영향받는 시스템
aws-cdk-lib 2.245.0 미만 (Windows는 2.246.0 미만) 버전을 사용하는 CDK 프로젝트 및 빌드 환경
⚔️ 공격 벡터
CDK 애플리케이션의 번들링 속성(externalModules, define, loader, inject, esbuildArgs) 값에 셸 메타문자를 주입하여 CDK 빌드 호스트에서 임의 명령 실행
🛡️ 대응 방법
aws-cdk-lib를 2.245.0 이상(Windows는 2.246.0 이상)으로 업그레이드
🔧 검증 코드
출력된 버전이 2.245.0 이상(Windows는 2.246.0 이상)이면 패치된 것이며, 그보다 낮으면 취약하므로 업그레이드가 필요합니다.
npm ls aws-cdk-lib 2>/dev/null | grep aws-cdk-lib