Baja

AWS CDK CodeBuild S3 Log Encryption Boolean Inversion

  • Publicada: 24.07.2026
  • Actualizado: 11.10.2026 11:23

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 <= 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 aws-security@amazon.com. Please do not create a public GitHub issue.

[1] https://aws.amazon.com/security/vulnerability-reporting/

Acknowledgement

AWS thanks AISafe for collaborating on this issue through the coordinated disclosure process.

Software afectado

Haz clic en una tecnología para ver todas sus vulnerabilidades.

PlataformaPaqueteVersiones vulnerablesCorregida en
Java / Kotlin (Maven) software.amazon.awscdk:aws-cdk-lib < 2.253.0 2.253.0
Java / Kotlin (Maven) software.amazon.awscdk:codebuild >= 1.75.0, <= 1.204.0 sin corrección
Paquete de npm @aws-cdk/aws-codebuild >= 1.75.0, <= 1.204.0 sin corrección
Paquete de npm aws-cdk-lib < 2.253.0 2.253.0
.NET (NuGet) Amazon.CDK.AWS.CodeBuild >= 1.75.0, <= 1.204.0 sin corrección
.NET (NuGet) Amazon.CDK.Lib < 2.253.0 2.253.0
Python (PyPI) aws-cdk-aws-codebuild >= 1.75.0, <= 1.204.0 sin corrección
Python (PyPI) aws-cdk-lib < 2.253.0 2.253.0

Referencias

Puntuación CVSS 3.3/10
Vector CVSS
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N
Debilidad (CWE)
CWE-311, CWE-682
Plataforma
Java / Kotlin (Maven), npm, .NET (NuGet), Python (PyPI)
Paquete
software.amazon.awscdk:aws-cdk-lib, software.amazon.awscdk:codebuild, @aws-cdk/aws-codebuild
Publicada
24.07.2026
Actualizado
11.10.2026 11:23

Fuentes y licencias

OSV / GitHub Advisory Database - GHSA-464c-974j-9xm6 - CC BY 4.0

Historial de vulnerabilidades: @aws-cdk/aws-codebuild

Todas las vulnerabilidades publicadas de este paquete (Paquete de npm), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.

Esta es la única vulnerabilidad conocida de este paquete.

Identifica las vulnerabilidades de tu aplicación

Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.

Conectar tu aplicación
Newsletter DockRay

La seguridad de tus aplicaciones en tu correo

Vulnerabilidades importantes, recomendaciones concretas y consejos prácticos para tus aplicaciones. Elige tus tecnologías y sigue lo que importa para tu proyecto.

  • Un resumen diario de nuevas vulnerabilidades, también las críticas.
  • Avisos sobre actualizaciones importantes.
  • Consejos prácticos sobre seguridad y monitorización de aplicaciones.

Déjalo vacío para recibir avisos de todas las tecnologías.

Suscripción gratuita. Date de baja con un clic en cualquier correo.