Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-110676 Overview
CVE-2026-110676 affects Cpanel::JSON::XS versions before 4.80 for Perl. The library allows memory exhaustion when the allow_bignum option is enabled. A JSON number with a fraction or exponent decodes to a Math::BigFloat, which stores the exponent separately and decodes cheaply. Encoding the resulting value untyped or as JSON_TYPE_FLOAT writes the full plain decimal form, producing one digit per unit of exponent. Nothing bounds the exponent during encoding. The 12-byte input [1e30000000] expands to roughly 30 MB on output. Services that decode untrusted JSON with allow_bignum and re-encode it can exhaust memory and CPU, enabling denial of service [CWE-405].
Critical Impact
A 12-byte attacker-controlled JSON payload can expand to tens of megabytes during re-encoding, exhausting server memory and CPU in Perl services that use allow_bignum.
Affected Products
- Cpanel::JSON::XS for Perl, all versions before 4.80
- Perl applications using the allow_bignum decoding option
- Downstream distributions bundling vulnerable Cpanel::JSON::XS releases
Discovery Timeline
- 2026-10-19 - CVE-2026-110676 published to NVD
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-110676
Vulnerability Analysis
The flaw is an asymmetry between decoding and encoding of Math::BigFloat values. When allow_bignum is set, the decoder parses scientific notation such as 1e30000000 into a Math::BigFloat object that keeps the mantissa and exponent as separate internal fields. This decode step is O(1) in output size and consumes trivial memory. The encoder, however, calls the plain-string form of the object, which materializes every digit implied by the exponent. The result is a linear blow-up: each unit of exponent adds one decimal digit to the serialized output. An attacker who controls a JSON value that is round-tripped through decode and encode can force the server to allocate arbitrarily large buffers and spend CPU producing them.
Root Cause
The encoder does not bound the exponent of a Math::BigFloat before serializing. It unconditionally emits the full decimal expansion rather than preserving scientific notation. This is a classic asymmetric resource consumption pattern [CWE-405] where parsing cost and emission cost are decoupled.
Attack Vector
Any Perl service that decodes untrusted JSON with allow_bignum and later re-encodes the structure is exposed. Typical patterns include API gateways, log normalizers, message brokers, and web applications that accept JSON and echo it back or persist it as JSON. A single small request can trigger allocation of hundreds of megabytes.
/* Patch excerpt from XS.xs - adds bignum_compact() to emit scientific form
for Math::BigFloat values with large exponents, avoiding full decimal expansion. */
return (stash == gv_stashpvs ("Math::BigInt", 0) || stash == gv_stashpvs ("Math::BigFloat", 0)) ? 1 : 0;
}
+/* Math::BigFloat with a large exponent: return its scientific form (bsstr), else NULL */
+#define BIGNUM_MAX_PLAIN_EXP 64
+static SV *
+bignum_compact (pTHX_ SV *rv)
+{
+ SV *res = NULL;
+ HV *stash;
+ int count;
+ dSP;
+
+ if (!SvROK (rv) || !SvOBJECT (SvRV (rv)))
+ return NULL;
+ stash = gv_stashpvs ("Math::BigFloat", 0);
+ if (!stash || SvSTASH (SvRV (rv)) != stash)
+ return NULL;
+
+ ENTER; SAVETMPS;
+ PUSHMARK (SP);
+ XPUSHs (rv);
+ PUTBACK;
+ count = call_method ("bsstr", G_SCALAR);
+ SPAGAIN;
+ if (count == 1)
+ res = newSVsv (POPs);
+ PUTBACK;
+ FREETMPS; LEAVE;
Source: GitHub Patch Commit
Detection Methods for CVE-2026-110676
Indicators of Compromise
- Inbound JSON payloads containing numbers with very large positive or negative exponents, for example 1e30000000.
- Perl worker processes with sudden resident set size growth into hundreds of megabytes while handling small requests.
- HTTP 500 responses, request timeouts, or OOM kills correlated with JSON endpoints that accept arbitrary numeric fields.
Detection Strategies
- Audit Perl code for calls to Cpanel::JSON::XS that enable allow_bignum on untrusted input and later re-encode decoded structures.
- Inspect dependency manifests (cpanfile, META.json, OS packages) for Cpanel::JSON::XS versions below 4.80.
- Add a parsing stage that rejects JSON numbers whose literal representation contains an exponent exceeding a safe threshold.
Monitoring Recommendations
- Alert on process memory growth and OOM events on hosts running Perl JSON services.
- Log request body size versus response body size and alert on amplification ratios greater than a defined threshold.
- Capture and review stack traces from crashed workers to confirm whether Cpanel::JSON::XS encode paths are involved.
How to Mitigate CVE-2026-110676
Immediate Actions Required
- Upgrade Cpanel::JSON::XS to version 4.80 or later across all Perl runtimes.
- Disable allow_bignum on decoders that process untrusted input unless strictly required.
- Enforce request size limits and per-request memory ceilings for Perl worker processes.
Patch Information
The fix shipped in Cpanel::JSON::XS 4.80. The encoder now calls bsstr on Math::BigFloat values whose exponent exceeds BIGNUM_MAX_PLAIN_EXP (64), emitting scientific form instead of fully expanded decimal digits. See the GitHub Patch Commit and the MetaCPAN Release Changes for details.
Workarounds
- Validate incoming JSON and reject numeric literals with absolute exponents above an application-defined cap before decoding.
- Avoid round-tripping untrusted decoded structures back through encode_json when allow_bignum is in effect.
- Run Perl services under cgroup memory limits so that an exploit attempt terminates the worker instead of the host.
# Upgrade Cpanel::JSON::XS to the patched release
cpanm Cpanel::JSON::XS@4.80
# Or via cpan
cpan RURBAN/Cpanel-JSON-XS-4.80.tar.gz
# Verify installed version
perl -MCpanel::JSON::XS -e 'print $Cpanel::JSON::XS::VERSION, "\n"'
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

