9.8
CRITICAL
CVE-2021-31875
Cesanta MongooseOS mJS JSON Heap-Based Buffer Overflow
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."

INFO

Published Date :

April 29, 2021, 2:15 a.m.

Last Modified :

Aug. 3, 2024, 11:15 p.m.

Remotely Exploitable :

Yes !

Impact Score :

5.9

Exploitability Score :

3.9
Affected Products

The following products are affected by CVE-2021-31875 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Cesanta mongooseos_mjs
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2021-31875.

URL Resource
https://github.com/418sec/mjs/pull/2 Patch Third Party Advisory
https://github.com/cesanta/mjs/releases/tag/1.26 Release Notes Third Party Advisory
https://huntr.dev/bounties/1-other-mjs/ Exploit Third Party Advisory

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2021-31875 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2021-31875 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by [email protected]

    Aug. 03, 2024

    Action Type Old Value New Value
  • CVE Modified by [email protected]

    May. 17, 2024

    Action Type Old Value New Value
  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • CVE Modified by [email protected]

    Apr. 11, 2024

    Action Type Old Value New Value
  • CVE Modified by [email protected]

    Mar. 21, 2024

    Action Type Old Value New Value
    Added Tag MITRE disputed
  • CVE Modified by [email protected]

    Nov. 07, 2023

    Action Type Old Value New Value
    Changed Description ** DISPUTED ** 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." 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."
  • Modified Analysis by [email protected]

    Mar. 01, 2023

    Action Type Old Value New Value
    Changed Reference Type https://github.com/cesanta/mjs/releases/tag/1.26 Third Party Advisory https://github.com/cesanta/mjs/releases/tag/1.26 Release Notes, Third Party Advisory
  • CVE Modified by [email protected]

    Dec. 27, 2022

    Action Type Old Value New Value
    Changed 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. ** DISPUTED ** 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."
  • Reanalysis by [email protected]

    Apr. 25, 2022

    Action Type Old Value New Value
    Added CWE NIST CWE-193
  • Initial Analysis by [email protected]

    May. 10, 2021

    Action Type Old Value New Value
    Added CVSS V2 NIST (AV:N/AC:L/Au:N/C:P/I:P/A:P)
    Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    Changed Reference Type https://github.com/418sec/mjs/pull/2 No Types Assigned https://github.com/418sec/mjs/pull/2 Patch, Third Party Advisory
    Changed Reference Type https://github.com/cesanta/mjs/releases/tag/1.26 No Types Assigned https://github.com/cesanta/mjs/releases/tag/1.26 Third Party Advisory
    Changed Reference Type https://huntr.dev/bounties/1-other-mjs/ No Types Assigned https://huntr.dev/bounties/1-other-mjs/ Exploit, Third Party Advisory
    Added CWE NIST CWE-787
    Added CPE Configuration OR *cpe:2.3:a:cesanta:mongooseos_mjs:1.26:*:*:*:*:*:*:*
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2021-31875 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2021-31875 weaknesses.

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

2.48 }} 1.85%

score

0.90372

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability