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-110682 Overview
CVE-2026-110682 affects Cpanel::JSON::XS versions from 4.42 before 4.80, a widely used Perl JSON parsing module. The flaw lets input chunking change the decoded value of top-level numbers, booleans, or null when processed through incr_parse. Because allow_nonref is enabled by default and inherited by the incremental parser, a top-level value with no closing delimiter is decoded based on whatever bytes have arrived so far. The bytes 12 decode as a single integer when read together, but as 1 followed by 2 when split across two reads. This is classified as an interpretation conflict weakness [CWE-436].
Critical Impact
A peer that can influence read boundaries can change how many messages a stream consumer decodes and what values they carry, enabling message smuggling or value tampering in stream-based JSON pipelines.
Affected Products
- Cpanel::JSON::XS for Perl, version 4.42
- Cpanel::JSON::XS for Perl, versions between 4.42 and 4.79
- Perl applications using incr_parse with default allow_nonref settings
Discovery Timeline
- 2026-10-19 - CVE-2026-110682 published to NVD
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-110682
Vulnerability Analysis
The vulnerability resides in the incremental JSON parser incr_parse provided by Cpanel::JSON::XS. Starting with version 4.42, allow_nonref became the default, letting the parser accept top-level scalar values rather than only objects or arrays. Objects ({}) and arrays ([]) have unambiguous closing delimiters, so the incremental parser knows when a value is complete. Top-level numbers, true, false, and null have no such delimiter. The parser treats any arriving bytes as potentially complete and returns the current decoded value when a chunk ends.
This makes the decoded output dependent on how a stream of bytes is split across reads. The same byte sequence 12 yields the integer 12 when delivered in one read, but yields 1 and then 2 when split across two reads. Consumers that treat each decoded value as a logical message can be driven to see different message counts and different values from identical byte streams.
Root Cause
The root cause is an interpretation conflict [CWE-436] between stream boundaries and value framing. incr_parse inherits the default allow_nonref behavior but lacks explicit end-of-value delimiting for bare scalars. The parser cannot distinguish an arriving digit that completes a number from the first digit of a longer number waiting for additional bytes.
Attack Vector
Any peer that controls or influences TCP segmentation, pipe writes, or framing in a stream feeding incr_parse can manipulate how values are decoded. In protocols that use JSON scalars as messages or control tokens, this allows message smuggling, duplicate message injection, or value tampering without modifying the underlying bytes.
# Patch excerpt - XS.pm documentation update
is why Cpanel::JSON::XS takes the conservative route and disallows
this case.
+Since C<allow_nonref> became the default (4.42), C<incr_parse> still
+rejects a top-level number, C<true>, C<false> or C<null> unless
+C<allow_nonref> was enabled explicitly, in which case the ambiguity above
+applies.
+
=head2 EXAMPLES
Source: GitHub Commit Patch
The patch requires explicit allow_nonref for bare scalars in incr_parse, closing the implicit inheritance that produced the ambiguity.
Detection Methods for CVE-2026-110682
Indicators of Compromise
- Repeated or duplicated numeric values in application logs where a single value was expected from a stream consumer.
- Decoded message counts that differ from expected framing counts in services using incr_parse over sockets or pipes.
- Downstream processing errors or value mismatches correlated with network segmentation anomalies or small MTU paths.
Detection Strategies
- Inventory Perl environments and identify applications loading Cpanel::JSON::XS versions between 4.42 and 4.79 using CPAN metadata or perl -MCpanel::JSON::XS -e 'print $Cpanel::JSON::XS::VERSION'.
- Audit source code for calls to incr_parse combined with top-level scalar inputs or missing explicit allow_nonref(0) settings.
- Review stream-based JSON consumers for assumptions that each decoded value represents one logical application message.
Monitoring Recommendations
- Log the raw byte boundaries and the count of values returned by incr_parse for correlation when anomalies occur.
- Monitor upstream dependency bumps for Cpanel::JSON::XS across CI pipelines and container images.
- Alert on process behavior that suggests duplicated or malformed decoded JSON values in services exposed to untrusted peers.
How to Mitigate CVE-2026-110682
Immediate Actions Required
- Upgrade Cpanel::JSON::XS to version 4.80 or later across all Perl environments.
- Audit all uses of incr_parse and disable allow_nonref unless top-level scalars are explicitly required.
- Validate that stream consumers enforce explicit framing (for example, newline-delimited JSON) rather than relying on parser boundaries.
Patch Information
The fix is included in Cpanel::JSON::XS4.80. See the MetaCPAN Release Changes and the GitHub Commit Patch. The patch requires explicit allow_nonref for bare scalars in incr_parse, restoring the stricter pre-4.42 behavior by default.
Workarounds
- Explicitly call $json->allow_nonref(0) before using incr_parse when top-level scalars are not expected.
- Wrap incoming data in objects or arrays so values carry explicit closing delimiters.
- Enforce an application-layer framing protocol such as length-prefixed messages or newline delimiters before decoding.
# Verify installed version and enforce safe parser configuration
perl -MCpanel::JSON::XS -e 'print $Cpanel::JSON::XS::VERSION, "\n"'
cpanm Cpanel::JSON::XS@4.80
# Perl snippet: disable allow_nonref on the incremental parser
perl -e 'use Cpanel::JSON::XS; my $j = Cpanel::JSON::XS->new->allow_nonref(0); $j->incr_parse($chunk);'
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

