Skip to main content

Cesanta mJS CVE-2026-86716

| EUVDEUVD-2026-73943 MEDIUM
Buffer Overflow (CWE-119)
2026-09-08 cna@vuldb.com GHSA-mcxw-v86m-vj8g
5.5
CVSS 4.0 · Vendor: vuldb
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send crafted JavaScript with malformed comment/whitespace sequence
  2. Delivery
    Reach skip_spaces_and_comments tokenizer in mjs_tok.c
  3. Exploit
    Overflow heap buffer boundary
  4. Execution
    Corrupt adjacent heap memory in mJS process
  5. Impact
    Achieve partial confidentiality/integrity/availability impact

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, buffer size validation
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the target system to accept remotely supplied JavaScript source code for parsing by the mJS engine in versions 1.0 through 1.26. The vulnerable code path (skip_spaces_and_comments in src/mjs_tok.c) is triggered unconditionally during lexical analysis of any input containing crafted whitespace or comment tokens. Per the CVSS 4.0 vector (PR:N/UI:N/AC:L), no authentication, user interaction, or special configuration is required - provided the attacker can reach the mJS parser with arbitrary input. The key limiting factor is deployment context: mJS is an embedded microcontroller engine, so exploitation is restricted to systems where untrusted remote input is fed directly to the parser, such as IoT devices with network-accessible scripting interfaces, embedded web servers executing user-supplied scripts, or automation gateways accepting remote configuration scripts. Deployments that only parse locally compiled or developer-authored scripts are not remotely exploitable through this vector.

Impact

The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) indicates fully unauthenticated, low-complexity network exploitation with no prerequisites, while the partial impact metrics (VC:L/VI:L/VA:L) yield a moderate 5.5 score reflecting incomplete control over heap corruption outcomes - not a reliable full-compromise primitive. SSVC classifies this as automatable with poc exploitation status and partial technical impact, consistent with the CVSS rating and confirming scripted mass-scanning is feasible. The E:P supplemental metric in the provided CVSS 4.0 vector corroborates the POC disclosure. No CISA KEV listing exists at time of analysis, suggesting exploitation remains opportunistic rather than targeted. The absence of a vendor response or patch elevates the sustained exposure window significantly, meaning even a mid-sized municipal IT team in malbork operating mJS-based IoT gateways has no vendor-supplied remediation path and must rely entirely on compensating controls. The gap between the automatable SSVC classification and the moderate CVSS score reflects that while exploitation delivery is trivial, reliable post-corruption control is constrained.

Exploit ScenarioDerived

An attacker sends a crafted JavaScript payload - containing specially structured comment sequences or whitespace patterns - to an IoT device or embedded gateway that passes remotely received scripts to the mJS engine for parsing. The tokenizer's skip_spaces_and_comments function overflows its heap allocation, achieving partial memory corruption within the mJS process. A public proof-of-concept has been disclosed via VulDB submissions 910881 and 910882, making this scenario reproducible without deep exploit development expertise.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 08, 2026

Heap-based buffer overflow in Cesanta mJS up to version 1.26 allows unauthenticated remote attackers to achieve partial memory corruption by supplying crafted JavaScript input that triggers the skip_spaces_and_comments tokenizer function in src/mjs_tok.c. All release versions from 1.0 through 1.26 are confirmed affected per EUVD-2026-73943. A public proof-of-concept exploit has been disclosed via VulDB, the vendor has not responded to the issue report, and no patch has been released at time of analysis.

RemediationAI

No vendor-released patch has been identified at time of analysis - the maintainer has not responded to the GitHub issue filed at https://github.com/cesanta/mjs/issues/324. The primary compensating control is to prevent untrusted or remotely supplied JavaScript from being passed to the mJS parser; systems that only execute developer-controlled scripts are not remotely exploitable via this vector. Where mJS processes network-supplied input (e.g., IoT gateways, embedded scripting endpoints), isolate the mJS interpreter in a sandboxed process or container to bound the blast radius of heap corruption to that process alone, preventing lateral escalation. Input pre-filtering to reject or truncate payloads containing deeply nested or unusually long comment sequences may reduce exposure but is not a reliable mitigation for a tokenizer-level flaw. Monitor https://github.com/cesanta/mjs/ for a patch commit targeting the skip_spaces_and_comments function in src/mjs_tok.c.

Affected VersionsENISA

mJS 1.9
mJS 1.0
mJS 1.19
mJS 1.5
mJS 1.17
mJS 1.10
mJS 1.6
mJS 1.26
mJS 1.4
mJS 1.20
mJS 1.12
mJS 1.1
mJS 1.14
mJS 1.2
mJS 1.22
mJS 1.25
mJS 1.24
mJS 1.23
mJS 1.15
mJS 1.11
mJS 1.16
mJS 1.21
mJS 1.8
mJS 1.3
mJS 1.7
mJS 1.18
mJS 1.13

Affected Packages

euvd mjs no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

mJS is Cesanta's lightweight JavaScript engine targeting microcontrollers and resource-constrained embedded systems. The vulnerable component is the lexical tokenizer in src/mjs_tok.c, specifically the skip_spaces_and_comments function responsible for advancing the input cursor past whitespace and comment tokens during source parsing. CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer) identifies the root cause: the function performs heap writes without enforcing bounds checks against the allocated buffer, allowing crafted comment or whitespace sequences to overflow adjacent heap memory. This class of vulnerability in parser front-ends is particularly dangerous because tokenization runs on all input unconditionally before any higher-level validation can occur. No CPE strings are present in the input data; affected versions span the full release history mJS 1.0 through 1.26 as enumerated by EUVD.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (vuldb) PRIMARY 5.5 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
vuln.today AI 7.3 HIGH

Network-exploitable tokenizer overflow requiring no auth or interaction; partial CIA impact reflects limited control over heap corruption without full code execution.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (vuldb).

CVSS VectorVendor: vuldb

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

A vulnerability was determined in Cesanta mJS up to 1.26. Affected is the function skip_spaces_and_comments of the file src/mjs_tok.c. Executing a manipulation can lead to heap-based buffer overflow. The attack can be launched remotely. The exploit has been publicly disclosed and may be utilized. The project was informed of the problem early through an issue report but has not responded yet.

Threat Intelligence Overview

EPSS Score
0.3%
Top 72% exploitable
Prevalence
Low
niche embedded JS engine targeting microcontrollers only
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

28
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +28
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy