Skip to main content

Mojo::JSON EUVDEUVD-2026-41798

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

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

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

3
Analysis Generated
Jul 06, 2026 - 19:24 vuln.today
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.

AnalysisAI

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.

Technical ContextAI

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.

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.

Share

EUVD-2026-41798 vulnerability details – vuln.today

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