GitHub Advisoryadvisory · npm, NuGet, Maven, Go, PyPI

GHSA-464c-974j-9xm6 AWS CDK CodeBuild S3 Log Encryption Boolean Inversion

LOW Published 2026-07-24 Modified 2026-07-24 Official page ↗
Ecosystem
npm, NuGet, Maven, Go, PyPI
Packages
aws-cdk-lib, Amazon.CDK.Lib, software.amazon.awscdk:aws-cdk-lib, github.com/aws/aws-cdk-go/awscdk/v2, @aws-cdk/aws-codebuild, Amazon.CDK.AWS.CodeBuild, software.amazon.awscdk:codebuild, github.com/aws/aws-cdk-go/awscdk, aws-cdk.aws-codebuild
Severity
Low
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N
Weaknesses
CWE-311, CWE-682
Reviewed
2026-07-24

Affected packages

• npm aws-cdk-lib: < 2.253.0 → fixed in 2.253.0 • NuGet Amazon.CDK.Lib: < 2.253.0 → fixed in 2.253.0 • Maven software.amazon.awscdk:aws-cdk-lib: < 2.253.0 → fixed in 2.253.0 • Go github.com/aws/aws-cdk-go/awscdk/v2: < 2.253.0 → fixed in 2.253.0 • npm @aws-cdk/aws-codebuild: >= 1.75.0, <= 1.204.0 (no fix yet) • NuGet Amazon.CDK.AWS.CodeBuild: >= 1.75.0, <= 1.204.0 (no fix yet) • Maven software.amazon.awscdk:codebuild: >= 1.75.0, <= 1.204.0 (no fix yet) • Go github.com/aws/aws-cdk-go/awscdk: >= 1.175.0-devpreview, <= 1.204.0-devpreview (no fix yet) • PyPI aws-cdk-lib: < 2.253.0 → fixed in 2.253.0 • PyPI aws-cdk.aws-codebuild: >= 1.75.0, <= 1.204.0 (no fix yet)

Description

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 receive `EncryptionDisabled: true`, disabling encryption. • Setting `encrypted: false` (intending encryption OFF) causes CloudFormation to receive `EncryptionDisabled: 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 Acknowledgement AWS thanks AISafe for collaborating on this issue through the coordinated disclosure process.

Related

Weakness · CWE (2)

  • CWE-311 Missing Encryption of Sensitive Data weakness
  • CWE-682 Incorrect Calculation weakness

References