GHSA-464c-974j-9xm6: AWS CDK CodeBuild S3 Log Encryption Boolean Inversion
Summary The AWS Cloud Development Kit (AWS CDK) is an open-source software development framework for defining cloud infrastructure in code and provisioning it through AWS CloudFormation. We identified an issue in which explicitly setting encrypted: true on the S3LoggingOptions property of an AWS CodeBuild project construct produces the opposite of the intended behavior, disabling encryption on CodeBuild build logs…
Published Jul 24, 2026
Affected packages
aws-cdk-lib
- Ecosystem
- npm
- Affected
- < 2.253.0
- Fixed in
- 2.253.0
- Check
npm ls aws-cdk-lib
Amazon.CDK.Lib
- Ecosystem
- NuGet
- Affected
- < 2.253.0
- Fixed in
- 2.253.0
- Check
dotnet list package --include-transitive
software.amazon.awscdk:aws-cdk-lib
- Ecosystem
- Maven
- Affected
- < 2.253.0
- Fixed in
- 2.253.0
- Check
mvn dependency:tree -Dincludes=software.amazon.awscdk:aws-cdk-lib
github.com/aws/aws-cdk-go/awscdk/v2
- Ecosystem
- Go
- Affected
- < 2.253.0
- Fixed in
- 2.253.0
- Check
go list -m github.com/aws/aws-cdk-go/awscdk/v2
@aws-cdk/aws-codebuild
- Ecosystem
- npm
- Affected
- >= 1.75.0, <= 1.204.0
- Fixed in
- No patched version yet
- Check
npm ls @aws-cdk/aws-codebuild
Amazon.CDK.AWS.CodeBuild
- Ecosystem
- NuGet
- Affected
- >= 1.75.0, <= 1.204.0
- Fixed in
- No patched version yet
- Check
dotnet list package --include-transitive
software.amazon.awscdk:codebuild
- Ecosystem
- Maven
- Affected
- >= 1.75.0, <= 1.204.0
- Fixed in
- No patched version yet
- Check
mvn dependency:tree -Dincludes=software.amazon.awscdk:codebuild
github.com/aws/aws-cdk-go/awscdk
- Ecosystem
- Go
- Affected
- >= 1.175.0-devpreview, <= 1.204.0-devpreview
- Fixed in
- No patched version yet
- Check
go list -m github.com/aws/aws-cdk-go/awscdk
aws-cdk-lib
- Ecosystem
- PyPI
- Affected
- < 2.253.0
- Fixed in
- 2.253.0
- Check
pip show aws-cdk-lib
aws-cdk.aws-codebuild
- Ecosystem
- PyPI
- Affected
- >= 1.75.0, <= 1.204.0
- Fixed in
- No patched version yet
- Check
pip show aws-cdk.aws-codebuild
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
The AWS Cloud Development Kit (AWS CDK) is an open-source software development framework for defining cloud infrastructure in code and provisioning it through AWS CloudFormation. We identified an issue in which explicitly setting encrypted: true on the S3LoggingOptions property of an AWS CodeBuild project construct produces the opposite of the intended behavior, disabling encryption on CodeBuild build logs stored in S3.
Impact
The S3LoggingOptions.encrypted property in the aws-codebuild module uses positive polarity (true = encryption ON), but is mapped directly to the CloudFormation S3LogsConfig.EncryptionDisabled field, which uses negative polarity (true = encryption OFF). Because the value is not negated before being passed to CloudFormation, any explicit assignment produces inverted behavior:
- Setting
encrypted: true(intending encryption ON) causes CloudFormation to receiveEncryptionDisabled: true, disabling encryption.
- Setting
encrypted: false(intending encryption OFF) causes CloudFormation to receiveEncryptionDisabled: false, enabling encryption.
Users who omit the property entirely are not affected, as undefined passes through to CloudFormation, which defaults to encryption enabled.
Users affected by this issue could have CodeBuild S3 build logs stored using SSE-S3 (Amazon S3-managed keys, AES-256) rather than the AWS managed keys that CodeBuild applies by default. Since January 5, 2023, Amazon S3 automatically encrypts all new object uploads with SSE-S3, so logs written after that date remain encrypted at rest. However, logs written prior to that date to buckets that did not have default encryption configured at the time are potentially not encrypted at rest.
Impacted versions: >= 1.75.0 and <= 2.252.0
Patches
This issue has been addressed in aws-cdk-lib version 2.253.0. Upgrade to the latest version and ensure any forked or derivative code is patched to incorporate the new fixes.
Workarounds
Users who are unable to immediately upgrade to version 2.253.0 should omit the encrypted property from their S3LoggingOptions configuration entirely. When the property is omitted, the value is not passed to CloudFormation, and CodeBuild applies its default behavior of encrypting build logs using AWS managed keys.
References
If you have any questions or comments about this advisory, contact AWS Security via our issue reporting page \[1\] or directly via email to [[email protected]](mailto:[email protected]). Please do not create a public GitHub issue.
\[1\]
Acknowledgement
AWS thanks AISafe for collaborating on this issue through the coordinated disclosure process.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-13760
aws-cdk-lib: OS Command Injection in NodejsFunction Docker Bundling
high7.3Jul 21, 2026CVE-2026-11417
aws-cdk-lib: OS Command Injection in NodejsFunction Bundling
high7.3Jun 15, 2026GHSA-qc59-cxj2-c2w4
aws-cdk-lib's aspect order change causes different Permissions Boundary assigned to Role
low2.2Apr 15, 2025GHSA-qq4x-c6h6-rfxh
aws-cdk-lib has Insertion of Sensitive Information into Log File vulnerability when using Cognito UserPoolClient Construct
medium6.5Mar 31, 2025GHSA-5pq3-h73f-66hr
AWS CDK CodePipeline: trusted entities are too broad
low3.8Mar 24, 2025CVE-2025-23206
AWS Cloud Development Kit (AWS CDK) IAM OIDC custom resource allows connection to unauthorized OIDC provider
low1.8Jan 17, 2025
