GHSA-h45p-w933-jxh3: @aws crypto/client browser Improper Verification Of Cryptographic Signature Vulnerability
MODERATEGHSA-h45p-w933-jxh3 is a MODERATE improper verification of cryptographic signature vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting @aws crypto/client browser libraries in the npm ecosystem. The issue involves improper verification of cryptographic signature in aws-encryption-sdk-javascript. Remediation is available by upgrading affected packages to version 1.9.0, 2.2.0.
GHSA-h45p-w933-jxh3 at a Glance
How to Fix GHSA-h45p-w933-jxh3
To remediate this vulnerability, upgrade all affected @aws crypto/client browser 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-crypto/client-browser@1.9.0
npm install @aws-crypto/client-browser@2.2.0
npm install @aws-crypto/client-node@1.9.0
npm install @aws-crypto/client-node@2.2.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @aws-crypto/client-browser
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-h45p-w933-jxh3, inspect your project dependencies using npm:
npm ls @aws-crypto/client-browser
Analyze the terminal output to locate any version of @aws crypto/client browser in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.9.0), your application is affected.
Note: The npm ls @aws-crypto/client-browser 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-347: Improper Verification of Cryptographic Signature, where the product does not verify, or incorrectly verifies, the cryptographic signature for data. In @aws crypto/client browser, 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-h45p-w933-jxh3 Affected @aws crypto/client browser Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@aws-crypto/client-browser
|
npm |
< 1.9.0
|
1.9.0
|
|
@aws-crypto/client-browser
|
npm |
≥ 2.0.0
< 2.2.0
|
2.2.0
|
|
@aws-crypto/client-node
|
npm |
< 1.9.0
|
1.9.0
|
|
@aws-crypto/client-node
|
npm |
≥ 2.0.0
< 2.2.0
|
2.2.0
|
References
Frequently Asked Questions
What is GHSA-h45p-w933-jxh3?
Which @aws crypto/client browser versions are affected?
What version fixes GHSA-h45p-w933-jxh3?
Is @aws-crypto/client-browser affected?
Is @aws-crypto/client-node affected?
What CWE is associated with GHSA-h45p-w933-jxh3?
How can I check npm dependencies for GHSA-h45p-w933-jxh3?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-h45p-w933-jxh3",
"modified" : "2021-06-01T18:59:14Z",
"published" : "2021-06-01T21:20:22Z",
"aliases" : [ ],
"summary" : "Improper Verification of Cryptographic Signature in aws-encryption-sdk-javascript ",
"details" : "### Impact\n\nThis advisory addresses several LOW severity issues with streaming signed messages and restricting processing of certain types of invalid messages. \n\nThis ESDK supports a streaming mode where callers may stream the plaintext of signed messages before the ECDSA signature is validated. In addition to these signatures, the ESDK uses AES-GCM encryption and all plaintext is verified before being released to a caller. There is no impact on the integrity of the ciphertext or decrypted plaintext, however some callers may rely on the the ECDSA signature for non-repudiation. Without validating the ECDSA signature, an actor with trusted KMS permissions to decrypt a message may also be able to encrypt messages. This update introduces a new API for callers who wish to stream only unsigned messages. \n\nFor customers who process ESDK messages from untrusted sources, this update also introduces a new configuration to limit the number of Encrypted Data Keys (EDKs) that the ESDK will attempt to process per message. This configuration provides customers with a way to limit the number of AWS KMS Decrypt API calls that the ESDK will make per message. This setting will reject messages with more EDKs than the configured limit.\n\nFinally, this update adds early rejection of invalid messages with certain invalid combinations of algorithm suite and header data.\n\n### Patches\n\nFixed in versions 1.9 and 2.2. We recommend that all users upgrade to address these issues.\n\nCustomers leveraging the ESDK’s streaming features have several options to protect signature validation. One is to ensure that client code reads to the end of the stream before using released plaintext. With this release, using the new API for streaming and falling back to the non-streaming decrypt API for signed messages prevents using any plaintext from signed data before the signature is validated. See https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/about-versions.html#version2.2.x\n\nUsers processing ESDK messages from untrusted sources should use the new maximum encrypted data keys parameter. See https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/about-versions.html#version2.2.x\n\n### Workarounds\n\nNone\n\n### For more information\n\nhttps://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#digital-sigs\n\nhttps://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/about-versions.html#version2.2.x\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@aws-crypto/client-browser"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.9.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@aws-crypto/client-browser"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.2.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@aws-crypto/client-node"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.9.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@aws-crypto/client-node"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.2.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/aws/aws-encryption-sdk-javascript/security/advisories/GHSA-h45p-w933-jxh3"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-347" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-06-01T18:59:14Z",
"nvd_published_at" : null
}
}