CVE-2021-31875
JSON

9.8critical

In mjsjson.c in Cesanta MongooseOS mJS 1.26, a maliciously formed JSON string can trigger an off-by-one heap-based buffer overflow in mjsjs…

Severity
9.8critical CVSS:3.1 by NVD
Exploit likelihood
2.17% (higher than 82% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre

Description

In mjs_json.c in Cesanta MongooseOS mJS 1.26, a maliciously formed JSON string can trigger an off-by-one heap-based buffer overflow in mjs_json_parse, which can potentially lead to redirection of control flow. NOTE: the original reporter disputes the significance of this finding because "there isn’t very much of an opportunity to exploit this reliably for an information leak, so there isn’t any real security impact."

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
cesanta mongooseos_mjs1.26NVD

All scores

NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD7.5high CVSS:2.0AV:N/AC:L/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

In mjs_json.c in Cesanta MongooseOS mJS 1.26, a maliciously formed JSON string can trigger an off-by-one heap-based buffer overflow in mjs_json_parse, which can potentially lead to redirection of control flow. NOTE: the original reporter disputes the significance of this finding because "there isn’t very much of an opportunity to exploit this reliably for an information leak, so there isn’t any real security impact."

NVD (es)

En el archivo mjs_json.c en Cesanta MongooseOS mJS 1.26, una cadena JSON formada maliciosamente puede desencadenar un desbordamiento de búfer en la región heap de la memoria por un paso en la función mjs_json_parse, lo que potencialmente puede conllevar a un redireccionamiento del flujo de control

References

https://huntr.dev/bounties/1-other-mjs/exploit, third-party-advisory
https://github.com/418sec/mjs/pull/2patch, third-party-advisory
https://github.com/cesanta/mjs/releases/tag/1.26release-notes, third-party-advisory

Sources

SourceRecordLicence
CVE ListCVE-2021-31875 changed 2024-08-03CVE Terms of Use
NVDCVE-2021-31875 changed 2026-06-17Public domain