GHSA-rjc6-vm4h-85cg: Aws sam cli Sensitive Information Exposure Through Insecure Vulnerability

MODERATE
CVSS 4.8
CWE-532
Published
Advisory Summary

GHSA-rjc6-vm4h-85cg is a MODERATE (CVSS 4.8) sensitive information exposure through insecure vulnerability (CWE-532: Insertion of Sensitive Information into Log File) affecting Aws sam cli libraries in the PyPI ecosystem. The issue involves sensitive information exposure through insecure logging for secrets like metadata.dockerbuildargs. Remediation is available by upgrading affected packages to version 1.122.0.

GHSA-rjc6-vm4h-85cg at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-rjc6-vm4h-85cg
Severity MODERATE
CVSS v3.1 Base Score 4.8
CWE Classification CWE-532: Insertion of Sensitive Information into Log File
Affected Product Aws sam cli
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 4.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix GHSA-rjc6-vm4h-85cg

To remediate this vulnerability, upgrade all affected Aws sam cli dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

aws-sam-cli fixed: 1.122.0
pip install aws-sam-cli>=1.122.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show aws-sam-cli

How to Check if You Are Affected

To determine whether your Python environment is affected by GHSA-rjc6-vm4h-85cg, inspect your installed packages using pip:

pip show aws-sam-cli

Analyze the terminal output to locate any version of Aws sam cli in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.122.0), your application is affected.

Note: The pip show aws-sam-cli command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-532: Insertion of Sensitive Information into Log File, where the product writes sensitive information to a log file. In Aws sam cli, 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

### Summary The AWS Serverless Application Model (SAM) CLI is an open source tool that allows customers to build, deploy and test their serverless applications built on AWS. AWS SAM CLI can build container (Docker) images and customers can specify arguments in the SAM template that are passed to the Docker engine during build [1]. ### Impact If customers specify sensitive data in the DockerBuildArgs parameter of their template, the sensitive data will be shown in clear text in the AWS SAM CLI output via STDERR when running the sam build command. ### Patches A patch is included in aws-sam-cli>=1.122.0. We strongly recommend customers install AWS SAM CLI v1.122.0 or above. Please review logs produced by your SAM CLI runs if you have used the DockerBuildArgs parameter and consider rotating the secrets if you believe they were exposed. ### References If you have any questions or comments about this issue, we ask that you contact AWS/Amazon Security via our vulnerability reporting page [2] or directly via email to [aws-security@amazon.com](mailto:aws-security@amazon.com). Please do not create a public GitHub issue. [1] https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-using-build.html#build-container-image [2] https://aws.amazon.com/security/vulnerability-reporting

GHSA-rjc6-vm4h-85cg Affected Aws sam cli Versions

1 component(s)
Fixed Versions:
1.122.0
Product / Package Ecosystem Affected Versions Fixed Version
aws-sam-cli
PyPI
< 1.122.0
1.122.0

References

Frequently Asked Questions

What is GHSA-rjc6-vm4h-85cg?
GHSA-rjc6-vm4h-85cg is a security vulnerability in Aws sam cli involving Sensitive Information Exposure Through Insecure Logging For Secrets Like Metadata.DockerBuildArgs under CWE-532: Insertion of Sensitive Information into Log File.
Which Aws sam cli versions are affected?
Affected versions include releases prior to 1.122.0 across affected packages: aws-sam-cli.
What version fixes GHSA-rjc6-vm4h-85cg?
Upgrading to 1.122.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is aws-sam-cli affected?
Yes, aws-sam-cli is affected in releases prior to 1.122.0. Upgrade your dependency to 1.122.0 or later.
What is the CVSS score of GHSA-rjc6-vm4h-85cg?
GHSA-rjc6-vm4h-85cg has a CVSS v3.1 base score of 4.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:N.
What CWE is associated with GHSA-rjc6-vm4h-85cg?
GHSA-rjc6-vm4h-85cg is classified under CWE-532: Insertion of Sensitive Information into Log File (The product writes sensitive information to a log file.).
How can I check PyPI dependencies for GHSA-rjc6-vm4h-85cg?
Run the dependency tree command: 'pip show aws-sam-cli'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rjc6-vm4h-85cg",
  "modified" : "2024-09-11T19:20:57Z",
  "published" : "2024-09-11T19:20:57Z",
  "aliases" : [ ],
  "summary" : "Sensitive Information Exposure Through Insecure Logging For Secrets Like Metadata.DockerBuildArgs",
  "details" : "### Summary\nThe AWS Serverless Application Model (SAM) CLI is an open source tool that allows customers to build, deploy and test their serverless applications built on AWS. AWS SAM CLI can build container (Docker) images and customers can specify arguments in the SAM template that are passed to the Docker engine during build [1].\n\n### Impact\nIf customers specify sensitive data in the DockerBuildArgs parameter of their template, the sensitive data will be shown in clear text in the AWS SAM CLI output via STDERR  when running the sam build command.\n\n### Patches\nA patch is included in aws-sam-cli>=1.122.0.\n\nWe strongly recommend customers install AWS SAM CLI v1.122.0 or above. Please review logs produced by your SAM CLI runs if you have used the DockerBuildArgs parameter and consider rotating the secrets if you believe they were exposed.\n\n### References\nIf you have any questions or comments about this issue, we ask that you contact AWS/Amazon Security via our vulnerability reporting page [2] 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://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-using-build.html#build-container-image \n\n[2] https://aws.amazon.com/security/vulnerability-reporting\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "aws-sam-cli"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.122.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/aws/aws-sam-cli/security/advisories/GHSA-rjc6-vm4h-85cg"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/aws/aws-sam-cli"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-532" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-09-11T19:20:57Z",
    "nvd_published_at" : null
  }
}