Skip to main content

Mojo::JSON CVE-2026-14803

| EUVDEUVD-2026-41798 MEDIUM
Uncontrolled Recursion (CWE-674)
2026-07-06 CPANSec GHSA-fp7f-j7qv-4qww
6.5
CVSS 3.1 · Vendor: CPANSec
View

Attack ChainAIDerived

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

  1. Recon
    Identify Mojolicious endpoint accepting JSON body
  2. Delivery
    Confirm pure-Perl decoder active (no XS)
  3. Exploit
    Craft deeply nested JSON payload
  4. Install
    POST payload to target endpoint
  5. C2
    Trigger unbounded recursion in _decode_value
  6. Execute
    Exhaust worker process memory
  7. Impact
    Deny service to legitimate users

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
Exploitation Conditions

Three conditions must hold simultaneously: (1) the target application is built on Mojolicious and decodes request bodies via Mojo::Message::json, $c->req->json, or any other caller of the pure-Perl decoder; (2) the pure-Perl code path is active at runtime, meaning Cpanel::JSON::XS is NOT installed and loadable, OR the environment variable MOJO_NO_JSON_XS=1 has been set - deployments with Cpanel::JSON::XS present are not vulnerable; and (3) the attacker can submit an arbitrary JSON body to an endpoint that decodes it. Limiting factors: the XS module is widely recommended for production installs and its presence completely eliminates the attack surface; impact is availability-only with no code execution or data exfiltration possible; and applications that enforce strict body size limits at the network perimeter reduce (but do not eliminate) risk. The CVSS vector assigns PR:L (low-privilege session required), though the decoder itself does not enforce authentication - the actual requirement depends on whether the application authenticates requests before parsing the body.

Impact

The provided CVSS of 6.5 (AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H) correctly captures a network-exploitable, low-complexity denial-of-service with no confidentiality or integrity impact. EPSS at 0.19% (8th percentile) is notably low for a medium-CVSS network vulnerability, consistent with DoS-only impact and the conditional nature of the vulnerable path - production Mojolicious stacks commonly include Cpanel::JSON::XS per CPAN best-practice guidance, which entirely removes exposure. No CISA KEV listing and no POC code have been identified, further reducing near-term exploitation probability. The primary real-world risk concentrates on deployments that skip the XS dependency, such as minimal container images or development environments, and that expose unauthenticated or lightly authenticated JSON endpoints. The CVSS PR:L assignment implies a session requirement, but the decoder itself imposes no authentication gate - any publicly reachable endpoint that calls Mojo::Message::json is equally exposed; actual risk depends on whether the application enforces authentication before JSON parsing.

Exploit ScenarioDerived

An attacker sends an HTTP POST request to any Mojolicious route that calls $c->req->json (or any other codepath reaching Mojo::Message::json), with a body consisting of thousands of levels of nested JSON arrays or objects - a payload that may be only a few kilobytes. The pure-Perl decoder recurses without bound through _decode_value → _decode_array → _decode_value, exhausting available memory and crashing or hanging the Mojolicious worker process, denying service to legitimate users. No public exploit code has been identified, but the attack is straightforward to implement from the published patch and OSS-Security advisory.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Jul 06, 2026

Memory exhaustion via uncontrolled recursion in Mojo::JSON's pure-Perl decoder allows network-accessible callers to cause denial of service in Mojolicious applications. All versions before 9.47 are affected when the pure-Perl decode path is active - specifically when Cpanel::JSON::XS is absent or MOJO_NO_JSON_XS=1 is set. No public exploit has been identified and EPSS sits at 0.19% (8th percentile), but the attack is conceptually trivial given the published patch diff and OSS-Security advisory.

RemediationAI

Upgrade Mojolicious to version 9.47 or later, which introduces a recursion depth limit in the pure-Perl JSON decoder. The fix commit is available at https://github.com/mojolicious/mojo/commit/cc38b0554275c4d84f6b8b49bcbbc1bec2068fe1.patch and the release changelog is at https://metacpan.org/release/SRI/Mojolicious-9.47/changes. For deployments that cannot upgrade immediately, the most effective compensating control is installing Cpanel::JSON::XS (available from CPAN), which causes Mojo::JSON to use the unaffected XS code path at runtime - verify the module is loadable with perl -MCpanel::JSON::XS -e 1. A secondary workaround is adding a JSON body size limit at the reverse proxy (e.g., client_max_body_size 1m in nginx or LimitRequestBody in Apache) to constrain payload size; note this reduces but does not eliminate risk, because deeply nested payloads can be small in bytes yet deeply recursive. Do not rely on unsetting MOJO_NO_JSON_XS alone unless Cpanel::JSON::XS is confirmed installed.

Affected VersionsENISA

Mojo::JSON 0 <9.47

Affected Packages

euvd mojo_json fix: 9.47

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

Mojo::JSON is the JSON component of the Mojolicious web framework for Perl (CPE: cpe:2.3:a:sri:mojo::json). The root cause is CWE-674 (Uncontrolled Recursion): the pure-Perl decoder uses mutual recursion across three functions - _decode_value dispatches to _decode_array or _decode_object depending on the opening token, and both array and object handlers recursively call _decode_value for each element or value. With no maximum depth guard, a crafted payload consisting entirely of nested arrays (e.g., [[[[...]]]]) or nested objects grows the call stack proportionally to nesting depth until process memory is exhausted. The XS-accelerated code path provided by the optional Cpanel::JSON::XS module does not share this Perl-level recursion and is entirely unaffected. The vulnerable path is the runtime default when Cpanel::JSON::XS cannot be loaded.

Know when Mojo gets its next vulnerability

  • 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 (CPANSec) PRIMARY 6.5 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 7.5 HIGH

The decoder imposes no authentication gate; any reachable JSON endpoint is exposed, so PR:N is more accurate than PR:L.

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

Primary rating from Vendor (CPANSec).

CVSS VectorVendor: CPANSec

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

2
CVSS changed
Jul 06, 2026 - 19:22 NVD
6.5 (MEDIUM)
CVE Published
Jul 06, 2026 - 01:34 cve.org
UNKNOWN (no severity yet)

DescriptionCVE.org

Mojo::JSON versions before 9.47 for Perl allow memory exhaustion via unbounded recursion in the pure-Perl decoder.

The pure-Perl decode path (_decode_value dispatching to _decode_array and _decode_object) recurses with no depth limit, so a small deeply nested JSON document can consume excessive memory.

This path is the default when Cpanel::JSON::XS is not installed or MOJO_NO_JSON_XS=1 is set; the Cpanel::JSON::XS fast path is not affected.

Any caller that decodes an untrusted JSON body, for example Mojo::Message::json reached through $c->req->json, can exhaust process memory and cause denial of service.

Threat Intelligence Overview

EPSS Score
0.2%
Top 92% exploitable
Prevalence
Medium
popular Perl web framework, not universally deployed
Social Media
4
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor CIRCL 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.2%
Patch available Yes
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
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

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

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Vendor StatusVendor

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