High
Security advisory
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2024-21524
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 8 Nov 2026, 02:31 UTC · Revision 1
Source evidence
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.
osv:CVE-2024-21524
Complete source record
{
"id": "71118b25bd29485321f05cef999342361116e184cbdd064833e3f432a6455c03",
"url": "https://osv.dev/vulnerability/CVE-2024-21524",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2024-21524",
"summary": "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.",
"evidence": "osv:CVE-2024-21524",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2024-21524",
"aliases": [
"CVE-2024-21524",
"GHSA-g533-xq5w-jmf3"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H/E:P"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/magiclen/node-stringbuilder",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"last_affected": "032697cc3e325148dbced50d561eb332937e32da"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:magiclen:stringbuilder:*:*:*:*:*:node.js:*:*",
"range": [
{
"introduced": "0"
},
{
"last_affected": "2.2.7"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"v2.2.7",
"v2.2.6",
"v2.2.5",
"v2.2.4",
"v2.2.3",
"v2.2.2",
"v2.2.1",
"v2.2.0",
"v2.1.1",
"v2.1.0",
"v2.0.2",
"v2.0.1",
"v2.0.0",
"v1.3.0",
"v1.1.0",
"v1.0.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-21524.json"
}
}
],
"modified": "2026-10-28T02:30:52.772218600Z",
"provider": "osv",
"references": [
"https://gist.github.com/dellalibera/0bb022811224f81d998fa61c3175ee67",
"https://github.com/magiclen/node-stringbuilder/blob/5c2797d3d6bf8cb6d10fe1e077609cef9a5a7de0/src/node-stringbuilder.c%23L1281",
"https://security.snyk.io/vuln/SNYK-JS-NODESTRINGBUILDER-6421617",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21524.json",
"https://nvd.nist.gov/vuln/detail/CVE-2024-21524"
],
"provider_metadata": {
"cwe_ids": [
"CWE-125"
],
"cna_assigner": "snyk",
"unresolved_ranges": [
{
"extracted_events": [
{
"range": [
{
"fixed": "*"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StandardRange"
}
]
}
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21524.json"
}
},
"related_cves": [
{
"value": "CVE-2024-21524",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 521807,
"published_at": "2024-07-10T05:00:05.257+00:00"
}