Vulnerabilities in pkg:nuget/Amazon.CDK.Lib
PACKAGEGHSA-464c-974j-9xm6 is a LOW (CVSS 3.3) aws cdk codebuild s3 log vulnerability (CWE-682: Incorrect Calculation) affecting Aws cdk lib libraries in the npm ecosystem. The issue involves aws cdk codebuild s3 log encryption boolean inversion. Remediation is available by upgrading affected packages to version 2.253.0.
pkg:nuget/Amazon.CDK.Lib
Vulnerability advisories affecting package pkg:nuget/Amazon.CDK.Lib. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-464c-974j-9xm6 | - | LOW | AWS CDK CodeBuild S3 Log Encryption Boolean Inversion |
GHSA-464c-974j-9xm6 at a Glance
Security Impact
CVSS: 3.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N).
How to Fix GHSA-464c-974j-9xm6
To remediate this vulnerability, upgrade all affected Aws cdk lib dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install aws-cdk-lib@2.253.0
Upgrade Amazon.CDK.Lib to 2.253.0
<dependency>
<groupId>software.amazon.awscdk</groupId>
<artifactId>aws-cdk-lib</artifactId>
<version>2.253.0</version>
</dependency>
Upgrade github.com/aws/aws-cdk-go/awscdk/v2 to 2.253.0
npm install @aws-cdk/aws-codebuild@Latest secure release
Upgrade Amazon.CDK.AWS.CodeBuild to Latest secure release
<dependency>
<groupId>software.amazon.awscdk</groupId>
<artifactId>codebuild</artifactId>
<version>Latest secure release</version>
</dependency>
Upgrade github.com/aws/aws-cdk-go/awscdk to Latest secure release
pip install aws-cdk-lib>=2.253.0
pip install aws-cdk.aws-codebuild>=Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls aws-cdk-lib
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-464c-974j-9xm6, inspect your project dependencies using npm:
npm ls aws-cdk-lib
Analyze the terminal output to locate any version of Aws cdk lib in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.253.0), your application is affected.
Note: The npm ls aws-cdk-lib command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-682: Incorrect Calculation, where the product performs a calculation that generates incorrect or unintended results that are later used in security-critical decisions or resource management. In Aws cdk lib, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-464c-974j-9xm6 Affected Aws cdk lib Versions
10 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
aws-cdk-lib
|
npm |
< 2.253.0
|
2.253.0
|
|
Amazon.CDK.Lib
|
NuGet |
< 2.253.0
|
2.253.0
|
|
software.amazon.awscdk:aws-cdk-lib
|
Maven |
< 2.253.0
|
2.253.0
|
|
github.com/aws/aws-cdk-go/awscdk/v2
|
Go |
< 2.253.0
|
2.253.0
|
|
@aws-cdk/aws-codebuild
|
npm |
≥ 1.75.0
≤ 1.204.0
|
|
|
Amazon.CDK.AWS.CodeBuild
|
NuGet |
≥ 1.75.0
≤ 1.204.0
|
|
|
software.amazon.awscdk:codebuild
|
Maven |
≥ 1.75.0
≤ 1.204.0
|
|
|
github.com/aws/aws-cdk-go/awscdk
|
Go |
≥ 1.175.0-devpreview
≤ 1.204.0-devpreview
|
|
|
aws-cdk-lib
|
PyPI |
< 2.253.0
|
2.253.0
|
|
aws-cdk.aws-codebuild
|
PyPI |
≥ 1.75.0
≤ 1.204.0
|
|
References
Frequently Asked Questions
What is GHSA-464c-974j-9xm6?
Which Aws cdk lib versions are affected?
What version fixes GHSA-464c-974j-9xm6?
Is aws-cdk-lib affected?
Is Amazon.CDK.Lib affected?
What is the CVSS score of GHSA-464c-974j-9xm6?
What CWE is associated with GHSA-464c-974j-9xm6?
How can I check npm dependencies for GHSA-464c-974j-9xm6?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-464c-974j-9xm6",
"modified" : "2026-07-24T16:44:20Z",
"published" : "2026-07-24T16:44:20Z",
"aliases" : [ ],
"summary" : "AWS CDK CodeBuild S3 Log Encryption Boolean Inversion",
"details" : "## Summary\n\nThe 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.\n\n## Impact\n\nThe `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:\n\n* Setting `encrypted: true` (intending encryption ON) causes CloudFormation to receive `EncryptionDisabled: true`, disabling encryption.\n\n* Setting `encrypted: false` (intending encryption OFF) causes CloudFormation to receive `EncryptionDisabled: false`, enabling encryption.\n\nUsers who omit the property entirely are not affected, as `undefined` passes through to CloudFormation, which defaults to encryption enabled.\n\nUsers 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.\n\nImpacted versions: >= 1.75.0 and <= 2.252.0\n\n## Patches\n\nThis 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.\n\n## Workarounds\n\nUsers 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.\n\n## References\n\nIf you have any questions or comments about this advisory, contact AWS Security via our issue reporting page \\[1\\] or directly via email to [aws-security@amazon.com](mailto:aws-security@amazon.com). Please do not create a public GitHub issue.\n\n\\[1\\] <https://aws.amazon.com/security/vulnerability-reporting/>\n\n## Acknowledgement\n\nAWS thanks AISafe for collaborating on this issue through the coordinated disclosure process.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "aws-cdk-lib"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.253.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "NuGet",
"name" : "Amazon.CDK.Lib"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.253.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "software.amazon.awscdk:aws-cdk-lib"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.253.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/aws/aws-cdk-go/awscdk/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.253.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@aws-cdk/aws-codebuild"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.75.0"
}, {
"last_affected" : "1.204.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "NuGet",
"name" : "Amazon.CDK.AWS.CodeBuild"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.75.0"
}, {
"last_affected" : "1.204.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "software.amazon.awscdk:codebuild"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.75.0"
}, {
"last_affected" : "1.204.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/aws/aws-cdk-go/awscdk"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.175.0-devpreview"
}, {
"last_affected" : "1.204.0-devpreview"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "aws-cdk-lib"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.253.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "aws-cdk.aws-codebuild"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.75.0"
}, {
"last_affected" : "1.204.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/aws/aws-cdk/security/advisories/GHSA-464c-974j-9xm6"
}, {
"type" : "WEB",
"url" : "https://github.com/aws/aws-cdk/pull/37761"
}, {
"type" : "WEB",
"url" : "https://github.com/aws/aws-cdk/commit/40319185dc645d2afc6acf1d25547a86250e97af"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/aws/aws-cdk"
}, {
"type" : "WEB",
"url" : "https://github.com/aws/aws-cdk/releases/tag/v2.253.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-311", "CWE-682" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-24T16:44:20Z",
"nvd_published_at" : null
}
}