CVE-2024-21524
CRITICAL 9.1CVSS 3.1node-stringbuilder vulnerable to Out-of-bounds Read
All versions of the package node-stringbuilder are vulnerable to Out-of-bounds Read due to incorrect memory length calculation, by calling ToBuffer, ToString, or CharAt on a StringBuilder object with a non-empty string value input. It's possible to return previously allocated memory, for example, by providing negative indexes, leading to an Information Disclosure.
- Published
- 10 Jul 2024
- Last modified
- 17 Jun 2026
- Assigned by
- report@snyk.io
- NVD status
- Modified
- Weakness
- CWE-125
- Also known as
- GHSA-g533-xq5w-jmf3
- Sources
- NVDJSONOSV GHSA-g533-xq5w-jmf3JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H |
| NVD | report@snyk.io (Secondary) | CVSS 3.1 | HIGH 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | magiclen | stringbuildercpe:2.3:a:magiclen:stringbuilder:*:*:*:*:*:node.js:*:* |
<= 2.2.7 | |
| OSV | npm | node-stringbuilder | <= 2.2.7 |
References
- https://gist.github.com/dellalibera/0bb022811224f81d998fa61c3175ee67 · Exploit, Third Party Advisory, WEB
- https://github.com/magiclen/node-stringbuilder/blob/5c2797d3d6bf8cb6d10fe1e077609cef9a5a7de0/src/node-stringbuilder.c%23L1281 · Broken Link
- https://security.snyk.io/vuln/SNYK-JS-NODESTRINGBUILDER-6421617 · Exploit, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-21524 · ADVISORY
- https://github.com/magiclen/node-stringbuilder · PACKAGE
- https://github.com/magiclen/node-stringbuilder/blob/5c2797d3d6bf8cb6d10fe1e077609cef9a5a7de0/src/node-stringbuilder.c#L1281 · WEB
History
- 25 Nov 2026 20:55 UTC · NVD: first stored (published 10 Jul 2024)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 10 Jul 2024)