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-110674 Overview
CVE-2026-110674 affects Cpanel::JSON::XS versions from 4.33 before 4.80 for Perl. The library fails to detect duplicate non-ASCII bare keys during JSON hash decoding. When callers enable the relaxed and dupkeys_as_arrayref options, attackers can trigger type confusion inside decode_hv. A crafted JSON payload can crash the Perl process or cause the library to dereference an attacker-controlled address derived from a JSON integer.
Critical Impact
Untrusted JSON parsed with relaxed and dupkeys_as_arrayref can crash the process or dereference an address chosen by a JSON number, enabling denial of service or memory corruption primitives.
Affected Products
- Cpanel::JSON::XS 4.33 through 4.79 for Perl
- Perl applications using decode_json with allow_barekey and dupkeys_as_arrayref enabled
- Downstream distributions bundling vulnerable Cpanel::JSON::XS releases
Discovery Timeline
- 2026-10-19 - CVE-2026-110674 published to the National Vulnerability Database (NVD)
- 2026-10-19 - Last updated in the NVD database
Technical Details for CVE-2026-110674
Vulnerability Analysis
The flaw sits in the decode_hv routine, which decodes JSON objects into Perl hashes. With allow_barekey active (implicitly enabled by relaxed), a bare key containing a non-ASCII byte is stored as UTF-8 but looked up as raw bytes. The encoding mismatch bypasses the duplicate-key check, so a repeated bare key silently replaces the earlier value instead of being merged.
From version 4.41 onward, dupkeys_as_arrayref changed the collision semantics. The decoder expects a hash slot for a repeated key to hold an array reference accumulating the values. A bare repeat of a non-ASCII key replaces that array reference with a plain scalar. A subsequent quoted repeat then calls av_push on the scalar as if it were an array, treating a JSON integer value as a raw AV* pointer. This is a classic type confusion [CWE-176] between encoded and raw byte representations.
Root Cause
The root cause is inconsistent string encoding handling between the storage path and the lookup path for bare keys. UTF-8 flagged keys and raw byte keys hash to different buckets, so duplicate detection fails for any bare key with a byte above 0x7F.
Attack Vector
An attacker supplies untrusted JSON to a Perl service that decodes it with relaxed and dupkeys_as_arrayref enabled. Repeating a non-ASCII bare key followed by a quoted repeat whose value is a JSON integer causes the integer to be dereferenced as a Perl array pointer, yielding a crash or controlled memory access.
if (UNLIKELY (key_exists && dupkeys_as_arrayref && old_value))
{
+ if (UNLIKELY (!SvROK (old_value)
+ || SvTYPE (SvRV (old_value)) != SVt_PVAV))
+ {
+ SvREFCNT_dec (value);
+ SvREFCNT_dec (old_value);
+ SvREFCNT_dec (keysv);
+ ERR ("Invalid dupkeys_as_arrayref hash key");
+ }
av_push ((AV*)SvRV (old_value), value);
(void)hv_store_ent (hv, keysv, old_value, 0);
}
Source: GitHub Commit Patch. The patch validates that old_value is a reference to an array (SVt_PVAV) before calling av_push, replacing the type confusion with a decode error.
Stop Remote Code Execution Before It Runs
Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.
Stop Exploit AttemptsDetection Methods for CVE-2026-110674
Indicators of Compromise
- Unexpected SIGSEGV or Bus error crashes in Perl processes that parse JSON
- Perl error messages referencing Cpanel::JSON::XS decode failures after processing external input
- Repeated hash keys containing non-ASCII bytes within inbound JSON payloads
Detection Strategies
- Inventory Perl applications and CPAN dependencies to identify installations of Cpanel::JSON::XS between 4.33 and 4.79.
- Review source code for calls to ->new->relaxed combined with dupkeys_as_arrayref on untrusted input.
- Instrument JSON parsers with crash reporting to surface segmentation faults triggered by malformed payloads.
Monitoring Recommendations
- Alert on process crashes of Perl workers handling web requests, mail filters, or API endpoints.
- Capture and inspect JSON request bodies for duplicate keys with high-bit bytes using WAF or proxy logging.
- Track CPAN package versions across production hosts and flag drift from the patched 4.80 release.
How to Mitigate CVE-2026-110674
Immediate Actions Required
- Upgrade Cpanel::JSON::XS to version 4.80 or later on all systems that decode untrusted JSON.
- Audit code for relaxed and dupkeys_as_arrayref usage and disable them where feasible.
- Restart Perl services, including mod_perl, Starman, and cPanel worker processes, after upgrading.
Patch Information
The fix is included in Cpanel::JSON::XS 4.80. The upstream commit c52037857d6a99d96ebd1ce3e2fa769505f028cf adds a type check on the stored value and aborts decoding with Invalid dupkeys_as_arrayref hash key instead of performing an unsafe cast. See the MetaCPAN Release Changes for the full changelog.
Workarounds
- Disable dupkeys_as_arrayref on decoder instances that process attacker-controlled JSON.
- Avoid enabling relaxed or allow_barekey when parsing data from untrusted sources.
- Pre-validate JSON with a strict parser before passing it to decoders configured with relaxed options.
# 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

