GHSA-4ph2-8337-hm62: Dynamodb encryption sdk Key Caching Behavior Vulnerability

LOW
CWE-862
Published
Advisory Summary

GHSA-4ph2-8337-hm62 is a LOW key caching behavior vulnerability (CWE-862: Missing Authorization) affecting Dynamodb encryption sdk libraries in the PyPI ecosystem. The issue involves key caching behavior in the dynamodb encryption client.. Remediation is available by upgrading affected packages to version 1.3.0.

GHSA-4ph2-8337-hm62 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-4ph2-8337-hm62
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-862: Missing Authorization
Affected Product Dynamodb encryption sdk
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix GHSA-4ph2-8337-hm62

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

dynamodb-encryption-sdk fixed: 1.3.0
pip install dynamodb-encryption-sdk>=1.3.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 dynamodb-encryption-sdk

How to Check if You Are Affected

To determine whether your Python environment is affected by GHSA-4ph2-8337-hm62, inspect your installed packages using pip:

pip show dynamodb-encryption-sdk

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

Note: The pip show dynamodb-encryption-sdk command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-862: Missing Authorization, where the product does not perform an authorization check when an actor attempts to access a resource or perform an action. In Dynamodb encryption sdk, 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

### Impact This advisory concerns users of MostRecentProvider in the DynamoDB Encryption Client with a key provider like AWS Key Management Service that allows for permissions on keys to be modified. When key usage permissions were changed at the key provider, time-based key reauthorization logic in MostRecentProvider did not reauthorize the use of the key. This created the potential for keys to be used in the DynamoDB Encryption Client after permissions to do so were revoked at the key provider. ### Patches Fixed as of 1.3.0. We recommend users to modify their code and adopt `CachingMostRecentProvider`. ### Workarounds Users who cannot upgrade to use the `CachingMostRecentProvider` can call `clear()` on the cache to manually flush all of its contents. Next use of the key will force a re-validation to occur with the key provider.

GHSA-4ph2-8337-hm62 Affected Dynamodb encryption sdk Versions

1 component(s)
Fixed Versions:
1.3.0
Product / Package Ecosystem Affected Versions Fixed Version
dynamodb-encryption-sdk
PyPI
< 1.3.0
1.3.0

References

Frequently Asked Questions

What is GHSA-4ph2-8337-hm62?
GHSA-4ph2-8337-hm62 is a security vulnerability in Dynamodb encryption sdk involving Key Caching behavior in the DynamoDB Encryption Client. under CWE-862: Missing Authorization.
Which Dynamodb encryption sdk versions are affected?
Affected versions include releases prior to 1.3.0 across affected packages: dynamodb-encryption-sdk.
What version fixes GHSA-4ph2-8337-hm62?
Upgrading to 1.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is dynamodb-encryption-sdk affected?
Yes, dynamodb-encryption-sdk is affected in releases prior to 1.3.0. Upgrade your dependency to 1.3.0 or later.
What CWE is associated with GHSA-4ph2-8337-hm62?
GHSA-4ph2-8337-hm62 is classified under CWE-862: Missing Authorization (The product does not perform an authorization check when an actor attempts to access a resource or perform an action.).
How can I check PyPI dependencies for GHSA-4ph2-8337-hm62?
Run the dependency tree command: 'pip show dynamodb-encryption-sdk'. 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-4ph2-8337-hm62",
  "modified" : "2021-02-05T21:22:28Z",
  "published" : "2021-02-08T17:43:49Z",
  "aliases" : [ ],
  "summary" : "Key Caching behavior in the DynamoDB Encryption Client.",
  "details" : "### Impact\nThis advisory concerns users of MostRecentProvider in the DynamoDB Encryption Client with a key provider like AWS Key Management Service that allows for permissions on keys to be modified.\n\nWhen key usage permissions were changed at the key provider, time-based key reauthorization logic in MostRecentProvider did not reauthorize the use of the key. This created the potential for keys to be used in the DynamoDB Encryption Client after permissions to do so were revoked at the key provider.\n\n### Patches\nFixed as of 1.3.0.  We recommend users to modify their code and adopt `CachingMostRecentProvider`.\n\n\n### Workarounds\nUsers who cannot upgrade to use the `CachingMostRecentProvider` can call `clear()` on the cache to manually flush all of its contents. Next use of the key will force a re-validation to occur with the key provider.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "dynamodb-encryption-sdk"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.3.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/aws/aws-dynamodb-encryption-python/security/advisories/GHSA-4ph2-8337-hm62"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/aws/aws-dynamodb-encryption-python/commit/90606ec9af7c2b5cb338d64639a62ee867d38d6b"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/aws/aws-dynamodb-encryption-python/blob/master/CHANGELOG.rst#130----2021-02-04"
  }, {
    "type" : "WEB",
    "url" : "https://pypi.org/project/dynamodb-encryption-sdk"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-862" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-02-05T21:22:28Z",
    "nvd_published_at" : null
  }
}