CVE-2024-21524
JSON

8.2high

node-stringbuilder vulnerable to Out-of-bounds Read

Severity
8.2high CVSS:3.1 by snyk
Exploit likelihood
0.87% (higher than 59% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
snyk
Also known as
GHSA-g533-xq5w-jmf3

Description

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.

Affected

Product or packageVersionsReported by
node-stringbuilderbefore *CVE List
magiclen node-stringbuilderbefore *CVE List
node-stringbuilder (npm)up to 2.2.7GitHub Advisory Database
magiclen stringbuilderup to 2.2.7NVD

All scores

snyk8.2high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H/E:P
GitHub8.2high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N
NVD9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H

Classification

CWE-125

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.

What each source says

CVE List

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.

NVD (es)

Todas las versiones del paquete node-stringbuilder son vulnerables a lecturas fuera de los límites debido a un cálculo incorrecto de la longitud de la memoria, al llamar a ToBuffer, ToString o CharAt en un objeto StringBuilder con una entrada de valor de cadena no vacía. Es posible devolver memoria previamente asignada, por ejemplo, proporcionando índices negativos, lo que lleva a una divulgación de información.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-21524 changed 2024-08-01CVE Terms of Use
GitHub Advisory DatabaseGHSA-g533-xq5w-jmf3 changed 2024-07-10CC-BY-4.0
NVDCVE-2024-21524 changed 2026-06-17Public domain