CWE-347
AllowedImproper Verification of Cryptographic Signature
Abstraction: Base · Status: Draft
The product does not verify, or incorrectly verifies, the cryptographic signature for data.
1277 vulnerabilities reference this CWE, most recent first.
GHSA-5RHM-55RH-PVVP
Vulnerability from github – Published: 2022-05-14 03:46 – Updated: 2025-04-20 03:48shibsp/metadata/DynamicMetadataProvider.cpp in the Dynamic MetadataProvider plugin in Shibboleth Service Provider before 2.6.1 fails to properly configure itself with the MetadataFilter plugins and does not perform critical security checks such as signature verification, enforcement of validity periods, and other checks specific to deployments, aka SSPCPP-763.
{
"affected": [],
"aliases": [
"CVE-2017-16852"
],
"database_specific": {
"cwe_ids": [
"CWE-347"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-11-16T17:29:00Z",
"severity": "HIGH"
},
"details": "shibsp/metadata/DynamicMetadataProvider.cpp in the Dynamic MetadataProvider plugin in Shibboleth Service Provider before 2.6.1 fails to properly configure itself with the MetadataFilter plugins and does not perform critical security checks such as signature verification, enforcement of validity periods, and other checks specific to deployments, aka SSPCPP-763.",
"id": "GHSA-5rhm-55rh-pvvp",
"modified": "2025-04-20T03:48:33Z",
"published": "2022-05-14T03:46:33Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-16852"
},
{
"type": "WEB",
"url": "https://bugs.debian.org/881857"
},
{
"type": "WEB",
"url": "https://git.shibboleth.net/view/?p=cpp-sp.git%3Ba=commit%3Bh=b66cceb0e992c351ad5e2c665229ede82f261b16"
},
{
"type": "WEB",
"url": "https://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=b66cceb0e992c351ad5e2c665229ede82f261b16"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2017/11/msg00025.html"
},
{
"type": "WEB",
"url": "https://shibboleth.net/community/advisories/secadv_20171115.txt"
},
{
"type": "WEB",
"url": "https://www.debian.org/security/2017/dsa-4038"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-5VFQ-RV44-C5FF
Vulnerability from github – Published: 2022-09-22 00:00 – Updated: 2025-05-28 18:33By spoofing the target resolver with responses that have a malformed ECDSA signature, an attacker can trigger a small memory leak. It is possible to gradually erode available memory to the point where named crashes for lack of resources.
{
"affected": [],
"aliases": [
"CVE-2022-38177"
],
"database_specific": {
"cwe_ids": [
"CWE-347",
"CWE-401"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-09-21T11:15:00Z",
"severity": "HIGH"
},
"details": "By spoofing the target resolver with responses that have a malformed ECDSA signature, an attacker can trigger a small memory leak. It is possible to gradually erode available memory to the point where named crashes for lack of resources.",
"id": "GHSA-5vfq-rv44-c5ff",
"modified": "2025-05-28T18:33:05Z",
"published": "2022-09-22T00:00:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-38177"
},
{
"type": "WEB",
"url": "https://kb.isc.org/docs/cve-2022-38177"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2022/10/msg00007.html"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CV4GQWBPF7Y52J2FA24U6UMHQAOXZEF7"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MRHB6J4Z7BKH4HPEKG5D35QGRD6ANNMT"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YZJQNUASODNVAWZV6STKG5SD6XIJ446S"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/CV4GQWBPF7Y52J2FA24U6UMHQAOXZEF7"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MRHB6J4Z7BKH4HPEKG5D35QGRD6ANNMT"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YZJQNUASODNVAWZV6STKG5SD6XIJ446S"
},
{
"type": "WEB",
"url": "https://security.gentoo.org/glsa/202210-25"
},
{
"type": "WEB",
"url": "https://security.netapp.com/advisory/ntap-20221228-0010"
},
{
"type": "WEB",
"url": "https://www.debian.org/security/2022/dsa-5235"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2022/09/21/3"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-5VHG-9XG4-CV9M
Vulnerability from github – Published: 2025-06-30 17:44 – Updated: 2025-07-01 13:13Summary
A malicious JSON-stringifyable message can be made passing on verify(), when global Buffer is buffer package
Details
This affects only environments where require('buffer') is https://npmjs.com/buffer
E.g.: browser bundles, React Native apps, etc.
Buffer.isBuffer check can be bypassed, resulting in strange objects being accepted as message, and those messages could trick verify() into returning false-positive true values
v2.x is unaffected as it verifies input to be an actual Uint8Array instance
Such a message can be constructed for any already known message/signature pair There are some restrictions though (also depending on the known message/signature), but not very limiting, see PoC for example
https://github.com/bitcoinjs/tiny-secp256k1/pull/140 is a subtle fix for this
PoC
This code deliberately doesn't provide reencode for now, could be updated later
import { randomBytes } from 'crypto'
import tiny from 'tiny-secp256k1' // 1.1.6
// Random keypair
const privateKey = randomBytes(32)
const publicKey = tiny.pointFromScalar(privateKey)
const valid = Buffer.alloc(32).fill(255) // let's sign a static buffer
const signature = tiny.sign(valid, privateKey)
// Prevent processing any unverified data by fail-closed throwing
function verified(data, signature) {
if (!Buffer.isBuffer(data)) data = Buffer.from(data, 'hex')
if (!tiny.verify(data, publicKey, signature)) throw new Error('Signature invalid!')
return new Uint8Array(data)
}
function safeProcess(payload) {
const totally = JSON.parse(payload) // e.g. json over network
const message = verified(totally, signature)
console.log(message instanceof Uint8Array)
console.log(Buffer.from(message).toString('utf8'))
}
const payload = reencode(valid, "Secure contain protect")
safeProcess(payload)
Output (after being bundled):
true
Secure contain protect����
Impact
Malicious messages could crafted to be verified from a given known valid message/signature pair
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 1.1.6"
},
"package": {
"ecosystem": "npm",
"name": "tiny-secp256k1"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.1.7"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-49365"
],
"database_specific": {
"cwe_ids": [
"CWE-347"
],
"github_reviewed": true,
"github_reviewed_at": "2025-06-30T17:44:14Z",
"nvd_published_at": "2025-07-01T03:15:21Z",
"severity": "HIGH"
},
"details": "### Summary\n\nA malicious JSON-stringifyable message can be made passing on `verify()`, when global Buffer is [`buffer` package](https://www.npmjs.com/package/buffer)\n\n### Details\n\nThis affects only environments where `require(\u0027buffer\u0027)` is \u003chttps://npmjs.com/buffer\u003e\nE.g.: browser bundles, React Native apps, etc.\n\n`Buffer.isBuffer` check can be bypassed, resulting in strange objects being accepted as `message`, and those messages could trick `verify()` into returning false-positive `true` values\n\nv2.x is unaffected as it verifies input to be an actual `Uint8Array` instance\n\nSuch a message can be constructed for any already known message/signature pair\nThere are some restrictions though (also depending on the known message/signature), but not very limiting, see PoC for example\n\nhttps://github.com/bitcoinjs/tiny-secp256k1/pull/140 is a subtle fix for this\n\n### PoC\n\nThis code deliberately doesn\u0027t provide `reencode` for now, could be updated later\n\n```js\nimport { randomBytes } from \u0027crypto\u0027\nimport tiny from \u0027tiny-secp256k1\u0027 // 1.1.6\n\n// Random keypair\nconst privateKey = randomBytes(32)\nconst publicKey = tiny.pointFromScalar(privateKey)\n\nconst valid = Buffer.alloc(32).fill(255) // let\u0027s sign a static buffer\nconst signature = tiny.sign(valid, privateKey)\n\n// Prevent processing any unverified data by fail-closed throwing\nfunction verified(data, signature) {\n if (!Buffer.isBuffer(data)) data = Buffer.from(data, \u0027hex\u0027)\n if (!tiny.verify(data, publicKey, signature)) throw new Error(\u0027Signature invalid!\u0027)\n return new Uint8Array(data)\n}\n\nfunction safeProcess(payload) {\n const totally = JSON.parse(payload) // e.g. json over network\n\n const message = verified(totally, signature)\n console.log(message instanceof Uint8Array)\n console.log(Buffer.from(message).toString(\u0027utf8\u0027)) \n}\n\nconst payload = reencode(valid, \"Secure contain protect\")\nsafeProcess(payload)\n```\n\nOutput (after being bundled):\n```console\ntrue\nSecure contain protect\ufffd\ufffd\ufffd\ufffd\n```\n\n### Impact\n\nMalicious messages could crafted to be verified from a given known valid message/signature pair",
"id": "GHSA-5vhg-9xg4-cv9m",
"modified": "2025-07-01T13:13:38Z",
"published": "2025-06-30T17:44:14Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/bitcoinjs/tiny-secp256k1/security/advisories/GHSA-5vhg-9xg4-cv9m"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-49365"
},
{
"type": "WEB",
"url": "https://github.com/bitcoinjs/tiny-secp256k1/pull/140"
},
{
"type": "PACKAGE",
"url": "https://github.com/bitcoinjs/tiny-secp256k1"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:P",
"type": "CVSS_V4"
}
],
"summary": "tiny-secp256k1 allows for verify() bypass when running in bundled environment"
}
GHSA-5W25-HXP5-H8C9
Vulnerability from github – Published: 2021-06-21 17:12 – Updated: 2026-01-23 22:42Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-7r96-8g3x-g36m. This link is maintained to preserve external references.
Original Description
tEnvoy contains the PGP, NaCl, and PBKDF2 in node.js and the browser (hashing, random, encryption, decryption, signatures, conversions), used by TogaTech.org. In versions prior to 7.0.3, the verifyWithMessage method of tEnvoyNaClSigningKey always returns true for any signature that has a SHA-512 hash matching the SHA-512 hash of the message even if the signature was invalid. This issue is patched in version 7.0.3. As a workaround: In tenvoy.js under the verifyWithMessage method definition within the tEnvoyNaClSigningKey class, ensure that the return statement call to this.verify ends in .verified.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "tenvoy"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "7.0.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-347"
],
"github_reviewed": true,
"github_reviewed_at": "2021-06-17T18:47:52Z",
"nvd_published_at": "2021-06-16T01:15:00Z",
"severity": "CRITICAL"
},
"details": "## Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-7r96-8g3x-g36m. This link is maintained to preserve external references.\n\n## Original Description\ntEnvoy contains the PGP, NaCl, and PBKDF2 in node.js and the browser (hashing, random, encryption, decryption, signatures, conversions), used by TogaTech.org. In versions prior to 7.0.3, the `verifyWithMessage` method of `tEnvoyNaClSigningKey` always returns `true` for any signature that has a SHA-512 hash matching the SHA-512 hash of the message even if the signature was invalid. This issue is patched in version 7.0.3. As a workaround: In `tenvoy.js` under the `verifyWithMessage` method definition within the `tEnvoyNaClSigningKey` class, ensure that the return statement call to `this.verify` ends in `.verified`.",
"id": "GHSA-5w25-hxp5-h8c9",
"modified": "2026-01-23T22:42:00Z",
"published": "2021-06-21T17:12:13Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/TogaTech/tEnvoy/security/advisories/GHSA-7r96-8g3x-g36m"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-32685"
},
{
"type": "WEB",
"url": "https://github.com/TogaTech/tEnvoy/commit/a121b34a45e289d775c62e58841522891dee686b"
},
{
"type": "WEB",
"url": "https://github.com/TogaTech/tEnvoy/releases/tag/v7.0.3"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Duplicate Advisory: Improper Verification of Cryptographic Signature",
"withdrawn": "2026-01-23T22:42:00Z"
}
GHSA-5WJQ-9MM7-CCM8
Vulnerability from github – Published: 2022-05-13 01:16 – Updated: 2022-05-13 01:16A vulnerability has been identified in SIMATIC S7-400 (incl. F) V6 and below (All versions), SIMATIC S7-400 PN/DP V7 (incl. F) (All versions), SIMATIC S7-400H V4.5 and below (All versions), SIMATIC S7-400H V6 (All versions < V6.0.9), SIMATIC S7-410 (All versions < V8.2.1). Sending of specially crafted packets to port 102/tcp via Ethernet interface via PROFIBUS or Multi Point Interfaces (MPI) could cause a Denial-of-Service condition on affected devices. Flashing with a firmware image may be required to recover the CPU. Successful exploitation requires an attacker to have network access to port 102/tcp via Ethernet interface or to be able to send messages via PROFIBUS or Multi Point Interfaces (MPI) to the device. No user interaction is required. If no access protection is configured, no privileges are required to exploit the security vulnerability. The vulnerability could allow causing a Denial-of-Service condition of the core functionality of the CPU, compromising the availability of the system. At the time of advisory publication no public exploitation of this security vulnerability was known.
{
"affected": [],
"aliases": [
"CVE-2018-16557"
],
"database_specific": {
"cwe_ids": [
"CWE-347"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-12-13T16:29:00Z",
"severity": "HIGH"
},
"details": "A vulnerability has been identified in SIMATIC S7-400 (incl. F) V6 and below (All versions), SIMATIC S7-400 PN/DP V7 (incl. F) (All versions), SIMATIC S7-400H V4.5 and below (All versions), SIMATIC S7-400H V6 (All versions \u003c V6.0.9), SIMATIC S7-410 (All versions \u003c V8.2.1). Sending of specially crafted packets to port 102/tcp via Ethernet interface via PROFIBUS or Multi Point Interfaces (MPI) could cause a Denial-of-Service condition on affected devices. Flashing with a firmware image may be required to recover the CPU. Successful exploitation requires an attacker to have network access to port 102/tcp via Ethernet interface or to be able to send messages via PROFIBUS or Multi Point Interfaces (MPI) to the device. No user interaction is required. If no access protection is configured, no privileges are required to exploit the security vulnerability. The vulnerability could allow causing a Denial-of-Service condition of the core functionality of the CPU, compromising the availability of the system. At the time of advisory publication no public exploitation of this security vulnerability was known.",
"id": "GHSA-5wjq-9mm7-ccm8",
"modified": "2022-05-13T01:16:11Z",
"published": "2022-05-13T01:16:11Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-16557"
},
{
"type": "WEB",
"url": "https://cert-portal.siemens.com/productcert/pdf/ssa-113131.pdf"
},
{
"type": "WEB",
"url": "https://ics-cert.us-cert.gov/advisories/ICSA-18-317-02"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-5WM9-5344-QRRJ
Vulnerability from github – Published: 2024-08-20 21:30 – Updated: 2024-09-30 21:02An XML signature wrapping vulnerability was present in GitHub Enterprise Server (GHES) when utilizing SAML authentication with specific identity providers. This vulnerability allowed an attacker with direct network access to GitHub Enterprise Server to forge a SAML response to provision and/or gain access to a user with site administrator privileges. Exploitation of this vulnerability would allow unauthorized access to the instance without requiring prior authentication. This vulnerability affected all versions of GitHub Enterprise Server prior to 3.14 and was fixed in versions 3.13.3, 3.12.8, 3.11.14, and 3.10.16. This vulnerability was reported via the GitHub Bug Bounty program.
{
"affected": [],
"aliases": [
"CVE-2024-6800"
],
"database_specific": {
"cwe_ids": [
"CWE-347"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-08-20T20:15:09Z",
"severity": "CRITICAL"
},
"details": "An XML signature wrapping vulnerability was present in GitHub Enterprise Server (GHES) when utilizing SAML authentication with specific identity providers. This vulnerability allowed an attacker with direct network access to GitHub Enterprise Server to forge a\u00a0SAML response to provision and/or gain access to a user with site administrator privileges. Exploitation of this vulnerability would allow unauthorized access to the instance without requiring prior authentication.\u00a0This vulnerability affected all versions of GitHub Enterprise Server prior to 3.14 and was fixed in versions 3.13.3, 3.12.8, 3.11.14, and 3.10.16. This vulnerability was reported via the GitHub Bug Bounty program.",
"id": "GHSA-5wm9-5344-qrrj",
"modified": "2024-09-30T21:02:12Z",
"published": "2024-08-20T21:30:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-6800"
},
{
"type": "WEB",
"url": "https://docs.github.com/en/enterprise-server@3.10/admin/release-notes#3.10.16"
},
{
"type": "WEB",
"url": "https://docs.github.com/en/enterprise-server@3.11/admin/release-notes#3.11.14"
},
{
"type": "WEB",
"url": "https://docs.github.com/en/enterprise-server@3.12/admin/release-notes#3.12.8"
},
{
"type": "WEB",
"url": "https://docs.github.com/en/enterprise-server@3.13/admin/release-notes#3.13.3"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:L/SC:H/SI:H/SA:L/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:U/V:C/RE:H/U:Red",
"type": "CVSS_V4"
}
]
}
GHSA-5X2R-HC65-25F9
Vulnerability from github – Published: 2026-01-28 16:44 – Updated: 2026-01-28 16:44Affected Crate: ml-dsa
Affected Versions: v0.1.0-rc.2 (and commits since b01c3b7)
Severity: Medium
Reporter: Oren Yomtov (Fireblocks)
Summary
The ML-DSA signature verification implementation in the RustCrypto ml-dsa crate incorrectly accepts signatures with repeated (duplicate) hint indices. According to the ML-DSA specification (FIPS 204 / RFC 9881), hint indices within each polynomial must be strictly increasing. The current implementation uses a non-strict monotonic check (<= instead of <), allowing duplicate indices.
Note: This is a regression bug. The original implementation was correct, but commit b01c3b7 ("Make ML-DSA signature decoding follow the spec (#895)", fixing issue #894) inadvertently changed the strict < comparison to <=, introducing the vulnerability.
Vulnerability Details
Root Cause
The vulnerability is located in the monotonic helper function in ml-dsa/src/hint.rs:
fn monotonic(a: &[usize]) -> bool {
a.iter().enumerate().all(|(i, x)| i == 0 || a[i - 1] <= *x)
}
The comparison operator <= allows equal consecutive values, meaning duplicate hint indices are not rejected. The correct implementation should use strict less-than (<):
fn monotonic(a: &[usize]) -> bool {
a.iter().enumerate().all(|(i, x)| i == 0 || a[i - 1] < *x)
}
Regression Analysis
- Original correct code (commit
1d3a1d1- "Add support for ML-DSA (#877)"): Used<(strict) - Bug introduced (commit
b01c3b7- "Make ML-DSA signature decoding follow the spec (#895)"): Changed to<=
The commit message suggests it was intended to fix issue #894 and make decoding follow the spec, but the change to the monotonic function was in the wrong direction. The other changes in that commit (to use_hint function) may have been correct, but this specific change introduced signature malleability.
Technical Impact
This vulnerability allows signature malleability - the same logical signature can have multiple valid byte-level encodings. An attacker can take a valid signature and create additional "valid" signatures by duplicating hint indices.
Per the ML-DSA specification (FIPS 204, Section 6.2 and Algorithm 26 HintBitUnpack), hint indices must be strictly increasing to ensure a unique, canonical encoding. Accepting non-canonical signatures can lead to:
- Signature Malleability: Multiple distinct byte sequences verify as valid for the same message/key pair
- Protocol-Level Vulnerabilities: Systems that rely on signature uniqueness (e.g., for transaction deduplication, replay protection, or signature-based identifiers) may be vulnerable
- Interoperability Issues: Non-compliant signatures may be rejected by other conforming implementations
Affected Security Levels
All ML-DSA parameter sets are affected: - ML-DSA-44 (NIST Security Level 2) - ML-DSA-65 (NIST Security Level 3) - ML-DSA-87 (NIST Security Level 5)
Proof of Concept
See the file poc_mldsa_repeated_hint.rs for a standalone proof of concept that demonstrates the vulnerability.
The PoC uses test vectors from the Wycheproof test suite that specifically test for this invalid encoding:
- Test Vector Source: Wycheproof ML-DSA Test Vectors
- Test Case ID 18: "signature with a repeated hint"
- Expected Result:
invalid - Actual Result:
valid(BUG)
Remediation
Update the monotonic function in ml-dsa/src/hint.rs to use strict less-than comparison:
fn monotonic(a: &[usize]) -> bool {
a.iter().enumerate().all(|(i, x)| i == 0 || a[i - 1] < *x)
}
Design Intent: ML-DSA is NOT Intended to Allow Malleability
While some cryptographic libraries intentionally permit signature malleability for compatibility or performance reasons, ML-DSA is explicitly designed to prevent it:
-
FIPS 204 Specification: ML-DSA is designed to be strongly unforgeable under chosen message attacks (SUF-CMA). This security property explicitly prevents signature malleability.
-
NIST PQC Forum Discussion: In February 2024, there was a discussion on the NIST PQC forum about potential malleability in ML-DSA's hint unpacking. The consensus was that ML-DSA is intended to be SUF-CMA, meaning any malleability issues should be considered bugs and fixed.
-
No Documentation of Intentional Malleability: There is no documentation in the RustCrypto
ml-dsacrate, FIPS 204, or RFC 9881 suggesting that signature malleability is an acceptable or intentional property. -
Regression Bug: The fact that the original implementation had strict ordering (
<) and this was changed to non-strict (<=) in a "fix" commit suggests this was an unintentional regression, not a design decision.
{
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "ml-dsa"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.4"
},
{
"fixed": "0.1.0-rc.4"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-24850"
],
"database_specific": {
"cwe_ids": [
"CWE-347"
],
"github_reviewed": true,
"github_reviewed_at": "2026-01-28T16:44:47Z",
"nvd_published_at": "2026-01-28T01:16:15Z",
"severity": "MODERATE"
},
"details": "**Affected Crate:** `ml-dsa` \n**Affected Versions:** v0.1.0-rc.2 (and commits since `b01c3b7`) \n**Severity:** Medium \n**Reporter:** Oren Yomtov (Fireblocks)\n\n## Summary\n\nThe ML-DSA signature verification implementation in the RustCrypto `ml-dsa` crate incorrectly accepts signatures with repeated (duplicate) hint indices. According to the ML-DSA specification (FIPS 204 / RFC 9881), hint indices within each polynomial must be **strictly increasing**. The current implementation uses a non-strict monotonic check (`\u003c=` instead of `\u003c`), allowing duplicate indices.\n\n**Note:** This is a regression bug. The original implementation was correct, but commit `b01c3b7` (\"Make ML-DSA signature decoding follow the spec (#895)\", fixing issue #894) inadvertently changed the strict `\u003c` comparison to `\u003c=`, introducing the vulnerability.\n\n## Vulnerability Details\n\n### Root Cause\n\nThe vulnerability is located in the `monotonic` helper function in `ml-dsa/src/hint.rs`:\n\n```rust\nfn monotonic(a: \u0026[usize]) -\u003e bool {\n a.iter().enumerate().all(|(i, x)| i == 0 || a[i - 1] \u003c= *x)\n}\n```\n\nThe comparison operator `\u003c=` allows equal consecutive values, meaning duplicate hint indices are not rejected. The correct implementation should use strict less-than (`\u003c`):\n\n```rust\nfn monotonic(a: \u0026[usize]) -\u003e bool {\n a.iter().enumerate().all(|(i, x)| i == 0 || a[i - 1] \u003c *x)\n}\n```\n\n### Regression Analysis\n\n- **Original correct code** (commit `1d3a1d1` - \"Add support for ML-DSA (#877)\"): Used `\u003c` (strict)\n- **Bug introduced** (commit `b01c3b7` - \"Make ML-DSA signature decoding follow the spec (#895)\"): Changed to `\u003c=`\n\nThe commit message suggests it was intended to fix issue #894 and make decoding follow the spec, but the change to the `monotonic` function was in the wrong direction. The other changes in that commit (to `use_hint` function) may have been correct, but this specific change introduced signature malleability.\n\n### Technical Impact\n\nThis vulnerability allows **signature malleability** - the same logical signature can have multiple valid byte-level encodings. An attacker can take a valid signature and create additional \"valid\" signatures by duplicating hint indices.\n\nPer the ML-DSA specification (FIPS 204, Section 6.2 and Algorithm 26 `HintBitUnpack`), hint indices must be strictly increasing to ensure a unique, canonical encoding. Accepting non-canonical signatures can lead to:\n\n1. **Signature Malleability:** Multiple distinct byte sequences verify as valid for the same message/key pair\n2. **Protocol-Level Vulnerabilities:** Systems that rely on signature uniqueness (e.g., for transaction deduplication, replay protection, or signature-based identifiers) may be vulnerable\n3. **Interoperability Issues:** Non-compliant signatures may be rejected by other conforming implementations\n\n### Affected Security Levels\n\nAll ML-DSA parameter sets are affected:\n- ML-DSA-44 (NIST Security Level 2)\n- ML-DSA-65 (NIST Security Level 3)\n- ML-DSA-87 (NIST Security Level 5)\n\n## Proof of Concept\n\nSee the file [`poc_mldsa_repeated_hint.rs`](https://gist.github.com/orenyomtov/fb4616eb77d33017f41a71b30aa41a04) for a standalone proof of concept that demonstrates the vulnerability.\n\nThe PoC uses test vectors from the Wycheproof test suite that specifically test for this invalid encoding:\n\n- **Test Vector Source:** [Wycheproof ML-DSA Test Vectors](https://github.com/C2SP/wycheproof/blob/master/testvectors_v1/mldsa_44_verify_test.json)\n- Test Case ID 18: \"signature with a repeated hint\"\n- Expected Result: `invalid`\n- Actual Result: `valid` (BUG)\n\n## Remediation\n\nUpdate the `monotonic` function in `ml-dsa/src/hint.rs` to use strict less-than comparison:\n\n```rust\nfn monotonic(a: \u0026[usize]) -\u003e bool {\n a.iter().enumerate().all(|(i, x)| i == 0 || a[i - 1] \u003c *x)\n}\n```\n\n## Design Intent: ML-DSA is NOT Intended to Allow Malleability\n\nWhile some cryptographic libraries intentionally permit signature malleability for compatibility or performance reasons, **ML-DSA is explicitly designed to prevent it**:\n\n1. **FIPS 204 Specification:** ML-DSA is designed to be strongly unforgeable under chosen message attacks (SUF-CMA). This security property explicitly prevents signature malleability.\n\n2. **NIST PQC Forum Discussion:** In February 2024, there was a discussion on the NIST PQC forum about potential malleability in ML-DSA\u0027s hint unpacking. The consensus was that ML-DSA is intended to be SUF-CMA, meaning any malleability issues should be considered bugs and fixed.\n\n3. **No Documentation of Intentional Malleability:** There is no documentation in the RustCrypto `ml-dsa` crate, FIPS 204, or RFC 9881 suggesting that signature malleability is an acceptable or intentional property.\n\n4. **Regression Bug:** The fact that the original implementation had strict ordering (`\u003c`) and this was changed to non-strict (`\u003c=`) in a \"fix\" commit suggests this was an unintentional regression, not a design decision.",
"id": "GHSA-5x2r-hc65-25f9",
"modified": "2026-01-28T16:44:47Z",
"published": "2026-01-28T16:44:47Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/RustCrypto/signatures/security/advisories/GHSA-5x2r-hc65-25f9"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-24850"
},
{
"type": "WEB",
"url": "https://github.com/RustCrypto/signatures/issues/894"
},
{
"type": "WEB",
"url": "https://github.com/RustCrypto/signatures/pull/895"
},
{
"type": "WEB",
"url": "https://github.com/RustCrypto/signatures/commit/400961412be2e2ab787942cf30e0a9b66b37a54a"
},
{
"type": "WEB",
"url": "https://github.com/RustCrypto/signatures/commit/b01c3b73dd08d0094e089aa234f78b6089ec1f38"
},
{
"type": "WEB",
"url": "https://csrc.nist.gov/pubs/fips/204/final"
},
{
"type": "WEB",
"url": "https://datatracker.ietf.org/doc/html/rfc9881"
},
{
"type": "WEB",
"url": "https://github.com/C2SP/wycheproof"
},
{
"type": "WEB",
"url": "https://github.com/C2SP/wycheproof/blob/master/testvectors_v1/mldsa_44_verify_test.json"
},
{
"type": "WEB",
"url": "https://github.com/C2SP/wycheproof/blob/master/testvectors_v1/mldsa_65_verify_test.json"
},
{
"type": "WEB",
"url": "https://github.com/C2SP/wycheproof/blob/master/testvectors_v1/mldsa_87_verify_test.json"
},
{
"type": "PACKAGE",
"url": "https://github.com/RustCrypto/signatures"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N",
"type": "CVSS_V3"
}
],
"summary": "ML-DSA Signature Verification Accepts Signatures with Repeated Hint Indices"
}
GHSA-5X58-GQG4-WFVQ
Vulnerability from github – Published: 2022-05-24 19:04 – Updated: 2022-05-24 19:04SOGo 2.x before 2.4.1 and 3.x through 5.x before 5.1.1 does not validate the signatures of any SAML assertions it receives. Any actor with network access to the deployment could impersonate users when SAML is the authentication method. (Only versions after 2.0.5a are affected.)
{
"affected": [],
"aliases": [
"CVE-2021-33054"
],
"database_specific": {
"cwe_ids": [
"CWE-347"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-06-04T15:15:00Z",
"severity": "HIGH"
},
"details": "SOGo 2.x before 2.4.1 and 3.x through 5.x before 5.1.1 does not validate the signatures of any SAML assertions it receives. Any actor with network access to the deployment could impersonate users when SAML is the authentication method. (Only versions after 2.0.5a are affected.)",
"id": "GHSA-5x58-gqg4-wfvq",
"modified": "2022-05-24T19:04:06Z",
"published": "2022-05-24T19:04:06Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-33054"
},
{
"type": "WEB",
"url": "https://blogs.akamai.com/2021/06/sogo-and-packetfence-impacted-by-saml-implementation-vulnerabilities.html"
},
{
"type": "WEB",
"url": "https://github.com/inverse-inc/sogo/blob/master/CHANGELOG.md"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2021/07/msg00007.html"
},
{
"type": "WEB",
"url": "https://www.debian.org/security/2021/dsa-5029"
},
{
"type": "WEB",
"url": "https://www.sogo.nu/news.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-5XXP-2VRJ-X855
Vulnerability from github – Published: 2026-03-13 16:10 – Updated: 2026-03-16 16:37Overview
The current SM9 decryption implementation contains an infinity-point ciphertext forgery vulnerability. The root cause is that, during decryption, the elliptic-curve point C1 in the ciphertext is only deserialized and checked to be on the curve, but the implementation does not explicitly reject the point at infinity.
In the current implementation, an attacker can construct C1 as the point at infinity, causing the bilinear pairing result to degenerate into the identity element in the GT group. As a result, a critical part of the key derivation input becomes a predictable constant. An attacker who only knows the target user's UID can derive the decryption key material and then forge a ciphertext that passes the integrity check.
Impact
The direct impact of this vulnerability is ciphertext forgery, not confidentiality loss.
- The attacker does not need the master public key, the user's private key, or any other secret material.
- The attacker only needs to know the target UID to construct a seemingly valid ciphertext.
- When the recipient invokes the SM9 decryption API, the forged ciphertext decrypts successfully to attacker-chosen plaintext.
- The C3 integrity check also passes, so this is not merely a format bypass, but a full forgery.
This issue affects the following paths because they all eventually enter the same UnwrapKey logic:
sm9.Decryptsm9.DecryptASN1sm9.UnwrapKey
This means the issue affects not only public-key encryption/decryption, but also key encapsulation/decapsulation.
Severity
This vulnerability should be rated as High.
Using CVSS 3.1 as a reference, it can be characterized as follows:
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Confidentiality impact: Low or None
- Integrity impact: High
- Availability impact: None
Overall, the estimated score falls in the High range, approximately 7.5.
It is High rather than Critical for the following reasons:
- It does not directly expose private keys and cannot directly decrypt legitimately generated ciphertexts.
- However, it can reliably break the authenticity and integrity assumptions of decrypted data.
- In any system that assumes only a legitimate sender can produce ciphertext that decrypts successfully, this is already a serious security failure.
Typical Risk Scenarios
- An attacker forges a business message that can be successfully decrypted by the target user.
- The application mistakenly treats successful decryption as evidence that the message came from a legitimate encrypting party.
- The attacker tricks the recipient into accepting forged instructions, forged notifications, or forged key material.
If a system treats SM9 ciphertext as both confidential and trustworthy in origin, this vulnerability directly breaks that trust assumption.
Root Cause
The root cause is that the implementation does not fully enforce the standard's decryption requirements: C1 must belong to the correct group, and C1 must not be the point at infinity.
It is important to be precise here: the point at infinity is itself a valid element of the elliptic-curve group and is mathematically on-curve. That is not the problem. The problem is not that the implementation incorrectly accepts the point at infinity as an on-curve point. Rather, the SM9 decryption procedure must do more than check that C1 is well-formed and on the curve; it must also explicitly reject C1 when it equals the group identity element O.
The current code only checks:
- Whether C1 can be successfully deserialized
- Whether C1 is on the curve
But it is missing:
C1 != O(the point at infinity)
In other words, the issue is not that the on-curve check is wrong, but that the implementation omits the additional rejection of the group identity element. That omission is what makes the attack possible.
Vulnerability recurrence
The overall process is as follows:
1. XOR the target plaintext with key[:len(plaintext)] to obtain C2.
2. Calculate C3 = SM3(C2 || key[len(plaintext):]), which involves concatenating C2 with the latter part of the key and then computing the SM3 hash.
3. Construct the ciphertext as ciphertext = C1 || C3 || C2, which means concatenating C1, C3, and C2 to form the final ciphertext.
4. Call sm9.Decrypt(userKey, uid, ciphertext, sm9.DefaultEncrypterOpts) for decryption.
7. Note that the PoC code did not use userKey when constructing the ciphertext. Therefore, if the decryption is successful and the target plaintext is obtained, it proves that the attack was successful.
package sm9_test
import (
"bytes"
"crypto/rand"
"testing"
"github.com/emmansun/gmsm/internal/sm9/bn256"
"github.com/emmansun/gmsm/sm3"
"github.com/emmansun/gmsm/sm9"
)
func TestInfinityPointCiphertextForgeryPublicAPI(t *testing.T) {
masterKey, err := sm9.GenerateEncryptMasterKey(rand.Reader)
if err != nil {
t.Fatal(err)
}
hid := byte(0x01)
uid := []byte("victim@example.com")
userKey, err := masterKey.GenerateUserKey(uid, hid)
if err != nil {
t.Fatal(err)
}
plaintext := []byte("forged-without-public-encryption")
c1 := make([]byte, 64)
gtIdentity := new(bn256.GT).SetOne()
var kdfInput []byte
kdfInput = append(kdfInput, c1...)
kdfInput = append(kdfInput, gtIdentity.Marshal()...)
kdfInput = append(kdfInput, uid...)
key1Len := len(plaintext)
forgeKey := sm3.Kdf(kdfInput, key1Len+sm3.Size)
c2 := make([]byte, key1Len)
for i := range c2 {
c2[i] = plaintext[i] ^ forgeKey[i]
}
hash := sm3.New()
hash.Write(c2)
hash.Write(forgeKey[key1Len:])
c3 := hash.Sum(nil)
forgedCiphertext := make([]byte, 0, 64+32+key1Len)
forgedCiphertext = append(forgedCiphertext, c1...)
forgedCiphertext = append(forgedCiphertext, c3...)
forgedCiphertext = append(forgedCiphertext, c2...)
recovered, err := sm9.Decrypt(userKey, uid, forgedCiphertext, sm9.DefaultEncrypterOpts)
if err != nil {
t.Fatalf("public Decrypt rejected forged ciphertext: %v", err)
}
if !bytes.Equal(recovered, plaintext) {
t.Fatalf("plaintext mismatch: got %q, want %q", string(recovered), string(plaintext))
}
t.Logf("VULN_CONFIRMED: sm9.Decrypt accepted forged ciphertext, recovered=%q", string(recovered))
}
Output: VULN_CONFIRMED: sm9.Decrypt accepted forged ciphertext, recovered="forged-without-public-encryption"
Remediation
In the shared UnwrapKey path used by both SM9 decryption and decapsulation, add an explicit rejection of the point at infinity after Unmarshal and IsOnCurve succeed.
Conceptually:
if p.IsInfinity() {
return nil, ErrDecryption
}
After the fix, unit tests should be added to ensure that:
- An all-zero C1 is rejected
- The raw ciphertext path rejects the forged input
- The ASN.1 ciphertext path rejects the forged input
UnwrapKeyalso rejects the forged input
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/emmansun/gmsm"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.41.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-32614"
],
"database_specific": {
"cwe_ids": [
"CWE-20",
"CWE-347"
],
"github_reviewed": true,
"github_reviewed_at": "2026-03-13T16:10:12Z",
"nvd_published_at": "2026-03-16T14:19:39Z",
"severity": "CRITICAL"
},
"details": "## Overview\n\nThe current SM9 decryption implementation contains an infinity-point ciphertext forgery vulnerability. The root cause is that, during decryption, the elliptic-curve point C1 in the ciphertext is only deserialized and checked to be on the curve, but the implementation does not explicitly reject the point at infinity.\n\nIn the current implementation, an attacker can construct C1 as the point at infinity, causing the bilinear pairing result to degenerate into the identity element in the GT group. As a result, a critical part of the key derivation input becomes a predictable constant. An attacker who only knows the target user\u0027s UID can derive the decryption key material and then forge a ciphertext that passes the integrity check.\n\n## Impact\n\nThe direct impact of this vulnerability is ciphertext forgery, not confidentiality loss.\n\n- The attacker does not need the master public key, the user\u0027s private key, or any other secret material.\n- The attacker only needs to know the target UID to construct a seemingly valid ciphertext.\n- When the recipient invokes the SM9 decryption API, the forged ciphertext decrypts successfully to attacker-chosen plaintext.\n- The C3 integrity check also passes, so this is not merely a format bypass, but a full forgery.\n\nThis issue affects the following paths because they all eventually enter the same `UnwrapKey` logic:\n\n- `sm9.Decrypt`\n- `sm9.DecryptASN1`\n- `sm9.UnwrapKey`\n\nThis means the issue affects not only public-key encryption/decryption, but also key encapsulation/decapsulation.\n\n## Severity\n\nThis vulnerability should be rated as High.\n\nUsing CVSS 3.1 as a reference, it can be characterized as follows:\n\n- Attack vector: Network\n- Attack complexity: Low\n- Privileges required: None\n- User interaction: None\n- Confidentiality impact: Low or None\n- Integrity impact: High\n- Availability impact: None\n\nOverall, the estimated score falls in the High range, approximately 7.5.\n\nIt is High rather than Critical for the following reasons:\n\n- It does not directly expose private keys and cannot directly decrypt legitimately generated ciphertexts.\n- However, it can reliably break the authenticity and integrity assumptions of decrypted data.\n- In any system that assumes only a legitimate sender can produce ciphertext that decrypts successfully, this is already a serious security failure.\n\n## Typical Risk Scenarios\n\n- An attacker forges a business message that can be successfully decrypted by the target user.\n- The application mistakenly treats successful decryption as evidence that the message came from a legitimate encrypting party.\n- The attacker tricks the recipient into accepting forged instructions, forged notifications, or forged key material.\n\nIf a system treats SM9 ciphertext as both confidential and trustworthy in origin, this vulnerability directly breaks that trust assumption.\n\n## Root Cause\n\nThe root cause is that the implementation does not fully enforce the standard\u0027s decryption requirements: C1 must belong to the correct group, and C1 must not be the point at infinity.\n\nIt is important to be precise here: the point at infinity is itself a valid element of the elliptic-curve group and is mathematically on-curve. That is not the problem. The problem is not that the implementation incorrectly accepts the point at infinity as an on-curve point. Rather, the SM9 decryption procedure must do more than check that C1 is well-formed and on the curve; it must also explicitly reject C1 when it equals the group identity element O.\n\nThe current code only checks:\n\n- Whether C1 can be successfully deserialized\n- Whether C1 is on the curve\n\nBut it is missing:\n\n- `C1 != O` (the point at infinity)\n\nIn other words, the issue is not that the on-curve check is wrong, but that the implementation omits the additional rejection of the group identity element. That omission is what makes the attack possible.\n\n## Vulnerability recurrence\n\nThe overall process is as follows:\n1. XOR the target plaintext with `key[:len(plaintext)]` to obtain `C2`.\n2. Calculate `C3 = SM3(C2 || key[len(plaintext):])`, which involves concatenating `C2` with the latter part of the key and then computing the SM3 hash.\n3. Construct the ciphertext as `ciphertext = C1 || C3 || C2`, which means concatenating `C1`, `C3`, and `C2` to form the final ciphertext.\n4. Call `sm9.Decrypt(userKey, uid, ciphertext, sm9.DefaultEncrypterOpts)` for decryption.\n7. Note that the PoC code did not use `userKey` when constructing the ciphertext. Therefore, if the decryption is successful and the target plaintext is obtained, it proves that the attack was successful.\n\n```go\npackage sm9_test\n\nimport (\n\t\"bytes\"\n\t\"crypto/rand\"\n\t\"testing\"\n\n\t\"github.com/emmansun/gmsm/internal/sm9/bn256\"\n\t\"github.com/emmansun/gmsm/sm3\"\n\t\"github.com/emmansun/gmsm/sm9\"\n)\n\nfunc TestInfinityPointCiphertextForgeryPublicAPI(t *testing.T) {\n\tmasterKey, err := sm9.GenerateEncryptMasterKey(rand.Reader)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\thid := byte(0x01)\n\tuid := []byte(\"victim@example.com\")\n\n\tuserKey, err := masterKey.GenerateUserKey(uid, hid)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tplaintext := []byte(\"forged-without-public-encryption\")\n\n\tc1 := make([]byte, 64)\n\tgtIdentity := new(bn256.GT).SetOne()\n\n\tvar kdfInput []byte\n\tkdfInput = append(kdfInput, c1...)\n\tkdfInput = append(kdfInput, gtIdentity.Marshal()...)\n\tkdfInput = append(kdfInput, uid...)\n\n\tkey1Len := len(plaintext)\n\tforgeKey := sm3.Kdf(kdfInput, key1Len+sm3.Size)\n\n\tc2 := make([]byte, key1Len)\n\tfor i := range c2 {\n\t\tc2[i] = plaintext[i] ^ forgeKey[i]\n\t}\n\n\thash := sm3.New()\n\thash.Write(c2)\n\thash.Write(forgeKey[key1Len:])\n\tc3 := hash.Sum(nil)\n\n\tforgedCiphertext := make([]byte, 0, 64+32+key1Len)\n\tforgedCiphertext = append(forgedCiphertext, c1...)\n\tforgedCiphertext = append(forgedCiphertext, c3...)\n\tforgedCiphertext = append(forgedCiphertext, c2...)\n\n\trecovered, err := sm9.Decrypt(userKey, uid, forgedCiphertext, sm9.DefaultEncrypterOpts)\n\tif err != nil {\n\t\tt.Fatalf(\"public Decrypt rejected forged ciphertext: %v\", err)\n\t}\n\n\tif !bytes.Equal(recovered, plaintext) {\n\t\tt.Fatalf(\"plaintext mismatch: got %q, want %q\", string(recovered), string(plaintext))\n\t}\n\n\tt.Logf(\"VULN_CONFIRMED: sm9.Decrypt accepted forged ciphertext, recovered=%q\", string(recovered))\n}\n```\n\n*Output*: VULN_CONFIRMED: sm9.Decrypt accepted forged ciphertext, recovered=\"forged-without-public-encryption\"\n\n\n## Remediation\n\nIn the shared `UnwrapKey` path used by both SM9 decryption and decapsulation, add an explicit rejection of the point at infinity after `Unmarshal` and `IsOnCurve` succeed.\n\nConceptually:\n\n```go\nif p.IsInfinity() {\n return nil, ErrDecryption\n}\n```\n\nAfter the fix, unit tests should be added to ensure that:\n\n- An all-zero C1 is rejected\n- The raw ciphertext path rejects the forged input\n- The ASN.1 ciphertext path rejects the forged input\n- `UnwrapKey` also rejects the forged input",
"id": "GHSA-5xxp-2vrj-x855",
"modified": "2026-03-16T16:37:09Z",
"published": "2026-03-13T16:10:12Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/emmansun/gmsm/security/advisories/GHSA-5xxp-2vrj-x855"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-32614"
},
{
"type": "PACKAGE",
"url": "https://github.com/emmansun/gmsm"
},
{
"type": "WEB",
"url": "https://github.com/emmansun/gmsm/releases/tag/v0.41.1"
},
{
"type": "WEB",
"url": "https://pkg.go.dev/vuln/GO-2026-4694"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:L/SI:H/SA:N",
"type": "CVSS_V4"
}
],
"summary": "SM9 Infinity-Point Ciphertext Forgery Vulnerability"
}
GHSA-626Q-V9J4-MCP4
Vulnerability from github – Published: 2023-02-02 16:59 – Updated: 2024-10-07 21:19Cause
is_valid_eth_signature is missing a call to finalize_keccak after calling verify_eth_signature.
Impact
As a result, any contract using is_valid_eth_signature from the account library (such as the EthAccount preset) is vulnerable to a malicious sequencer. Specifically, the malicious sequencer would be able to bypass signature validation to impersonate an instance of these accounts.
Risk
In order to exploit this vulnerability, it is required to control a sequencer or prover since they're the ones executing the hints, being able to inject incorrect keccak results.
Today StarkWare is the only party running both a prover or a sequencer, greatly reducing the risk of exploit.
Patches
The issue has been patched in 0.6.1.
For more information
If you have any questions or comments about this advisory: * Open an issue in the Contracts for Cairo repository * Email us at security@openzeppelin.com
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "openzeppelin-cairo-contracts"
},
"ranges": [
{
"events": [
{
"introduced": "0.2.0"
},
{
"fixed": "0.6.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-23940"
],
"database_specific": {
"cwe_ids": [
"CWE-345",
"CWE-347"
],
"github_reviewed": true,
"github_reviewed_at": "2023-02-02T16:59:46Z",
"nvd_published_at": "2023-02-03T20:15:00Z",
"severity": "MODERATE"
},
"details": "### Cause\n`is_valid_eth_signature` is missing a call to `finalize_keccak` after calling `verify_eth_signature`. \n\n### Impact\nAs a result, any contract using `is_valid_eth_signature` from the account library (such as the `EthAccount` preset) is vulnerable to a malicious sequencer. Specifically, the malicious sequencer would be able to bypass signature validation to impersonate an instance of these accounts.\n\n### Risk\nIn order to exploit this vulnerability, it is required to control a sequencer or prover since they\u0027re the ones executing the hints, being able to inject incorrect keccak results.\n\nToday StarkWare is the only party running both a prover or a sequencer, greatly reducing the risk of exploit.\n\n### Patches\nThe issue has been patched in 0.6.1.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [the Contracts for Cairo repository](https://github.com/OpenZeppelin/cairo-contracts/issues/new/choose)\n* Email us at [security@openzeppelin.com](mailto:security@openzeppelin.com)",
"id": "GHSA-626q-v9j4-mcp4",
"modified": "2024-10-07T21:19:33Z",
"published": "2023-02-02T16:59:46Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/OpenZeppelin/cairo-contracts/security/advisories/GHSA-626q-v9j4-mcp4"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-23940"
},
{
"type": "WEB",
"url": "https://github.com/OpenZeppelin/cairo-contracts/pull/542/commits/6d4cb750478fca2fd916f73297632f899aca9299"
},
{
"type": "PACKAGE",
"url": "https://github.com/OpenZeppelin/cairo-contracts"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/openzeppelin-cairo-contracts/PYSEC-2023-39.yaml"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "OpenZeppelin Contracts contains Improper Verification of Cryptographic Signature"
}
No mitigation information available for this CWE.
CAPEC-463: Padding Oracle Crypto Attack
An adversary is able to efficiently decrypt data without knowing the decryption key if a target system leaks data on whether or not a padding error happened while decrypting the ciphertext. A target system that leaks this type of information becomes the padding oracle and an adversary is able to make use of that oracle to efficiently decrypt data without knowing the decryption key by issuing on average 128*b calls to the padding oracle (where b is the number of bytes in the ciphertext block). In addition to performing decryption, an adversary is also able to produce valid ciphertexts (i.e., perform encryption) by using the padding oracle, all without knowing the encryption key.
CAPEC-475: Signature Spoofing by Improper Validation
An adversary exploits a cryptographic weakness in the signature verification algorithm implementation to generate a valid signature without knowing the key.