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-110675 Overview
CVE-2026-110675 affects the Cpanel::JSON::XS Perl module from version 4.33 up to (but not including) 4.80. The module fails to validate bare hash keys when the allow_barekey and utf8 decoder options are enabled. Under these settings, bare key bytes are stored directly into a UTF-8 flagged Perl string without any UTF-8 validation. Malformed UTF-8 sequences, control bytes, and backslashes reach the decoded hash. Later operations on the key such as lc, uc, or re-encoding die with a malformed UTF-8 error. This mismatch between quoted and bare key validation falls under [CWE-1286: Improper Validation of Syntactic Correctness of Input].
Critical Impact
Attackers submitting JSON with crafted bare keys can inject malformed UTF-8 that corrupts downstream Perl string handling and triggers runtime exceptions in applications using allow_barekey.
Affected Products
- Cpanel::JSON::XS for Perl, versions >= 4.33 and < 4.80
- Perl applications that enable both utf8 and allow_barekey decoder flags
- Downstream distributions bundling vulnerable Cpanel::JSON::XS releases
Discovery Timeline
- 2026-10-19 - CVE-2026-110675 published to the National Vulnerability Database
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-110675
Vulnerability Analysis
The defect lives in decode_hv, the hash decoder in XS.xs. When allow_barekey relaxes JSON parsing to accept unquoted keys, the decoder reads raw bytes from the input stream and stores them directly through hash insertion routines. Quoted keys travel through the standard UTF-8 validator, which rejects malformed sequences, control bytes, and other illegal characters. Bare keys skip this path entirely.
The resulting Perl scalar carries the UTF-8 flag but contains byte sequences that are not valid UTF-8. Any subsequent operation that interprets the string as text, including case conversion with lc or uc and re-encoding with encode_json, raises a Malformed UTF-8 character exception. Applications that iterate hashes received from untrusted JSON producers abort mid-request.
Root Cause
The root cause is an inconsistent validation path. The decoder validates quoted-string keys and values but omits the equivalent check in the bare-key branch of decode_hv. Backslashes and bytes below 0x20 are also accepted when they should be rejected. The patch adds an explicit loop that walks the key bytes, calls decode_utf8 on high-bit sequences, and errors on control characters or backslashes.
Attack Vector
An attacker supplies JSON input containing a bare key with crafted bytes to any Perl service that decodes with allow_barekey enabled. No authentication is required beyond the application's normal input path. Exploitation triggers denial of service through runtime exceptions during hash processing. In applications that persist decoded hashes, the malformed scalar can propagate and cause failures far from the original decode call.
if (UNLIKELY(p - key > I32_MAX))
ERR ("Hash key too large");
#endif
+ if (is_bare)
+ for (i = 0; i < len; )
+ {
+ unsigned char c = (unsigned char)key[i];
+ if (c >= 0x80)
+ {
+ STRLEN clen;
+ decode_utf8 (aTHX_ (U8*)key + i, len - i,
+ dec->json.flags & F_RELAXED, &clen);
+ if (clen == (STRLEN)-1 || clen == 0)
+ ERR ("malformed UTF-8 character in bare hash key");
+ i += clen;
+ }
+ else if (c < 0x20 || c == '\\')
+ ERR ("invalid character in bare hash key");
+ else
+ i++;
+ }
/* negative klen: look the key up as UTF-8, as hv_store_str stores it */
for (i = 0; i < len; i++)
if ((signed char)key[i] < 0)
Source: GitHub Commit Patch
Detection Methods for CVE-2026-110675
Indicators of Compromise
- Perl process exceptions containing Malformed UTF-8 character originating from Cpanel::JSON::XS or downstream code calling lc, uc, or encode_json on hash keys.
- Repeated 500-class HTTP responses from JSON-parsing endpoints that correlate with specific client payloads containing bare keys.
- Application logs showing decode success followed by delayed failure during hash serialization or key normalization.
Detection Strategies
- Inventory Perl applications and dependencies for Cpanel::JSON::XS versions >= 4.33 and < 4.80 using cpan -D Cpanel::JSON::XS or packaging manifests.
- Audit source code for decoder construction with allow_barekey => 1 combined with utf8 => 1 to identify exposed call sites.
- Add input logging on JSON endpoints to flag payloads with unquoted keys or non-ASCII bytes outside quoted strings.
Monitoring Recommendations
- Alert on recurring Malformed UTF-8 die messages in Perl worker logs and tie them to request IDs for payload reconstruction.
- Monitor process crash and restart rates for Perl services exposed to external JSON input.
- Track module versions in CI pipelines and fail builds that resolve Cpanel::JSON::XS to a vulnerable release.
How to Mitigate CVE-2026-110675
Immediate Actions Required
- Upgrade Cpanel::JSON::XS to version 4.80 or later across all Perl environments.
- Identify every decoder instantiation that sets allow_barekey and review whether bare-key parsing is actually required.
- Restart long-running Perl workers after upgrade so they load the patched XS module.
Patch Information
The fix is committed as c2cd022 in the upstream repository and shipped in release 4.80. The patch adds explicit byte-level validation for bare hash keys in decode_hv, rejecting malformed UTF-8, control bytes below 0x20, and literal backslashes. See the GitHub Commit Patch and the MetaCPAN Release Changes for full details.
Workarounds
- Disable allow_barekey on decoder instances exposed to untrusted input and require strict JSON with quoted keys.
- Place a validation proxy in front of Perl services that rejects JSON documents containing bare keys before they reach the decoder.
- Wrap decode_json calls in eval blocks and sanitize or discard requests that raise malformed UTF-8 exceptions to prevent worker termination.
# Upgrade Cpanel::JSON::XS to the patched release
cpanm Cpanel::JSON::XS@4.80
# 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

