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-110685 Overview
CVE-2026-110685 is a memory leak vulnerability in Cpanel::JSON::XS versions before 4.80 for Perl. The flaw resides in the decode_tag function, which handles tagged values when the allow_tags option is enabled. When a class's THAW method dies during deserialization, the decoded class name and argument array are not released. The leaked structure can be arbitrarily large because the sender controls the content of the tagged document. A long-running Perl process that catches the thrown error and continues operating gradually exhausts available memory, enabling a denial-of-service condition. The issue is tracked as [CWE-401: Missing Release of Memory after Effective Lifetime].
Critical Impact
Attackers can send repeated malformed tagged JSON documents to exhaust process memory on any Perl service that uses allow_tags and catches decode errors.
Affected Products
- Cpanel::JSON::XS for Perl, versions prior to 4.80
- Perl applications invoking decode with allow_tags enabled
- Services that catch decode exceptions and continue processing input
Discovery Timeline
- 2026-10-19 - CVE-2026-110685 published to NVD
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-110685
Vulnerability Analysis
The vulnerability is a resource management defect in the XS (C) implementation of the Perl JSON decoder. When allow_tags is enabled, Cpanel::JSON::XS recognizes tagged values of the form ("ClassName")[args] and dispatches them to the named class's THAW method for object reconstruction. The decoder allocates two Perl scalars before invoking THAW: tag holds the class name and val holds the decoded argument array. These scalars are freed only after THAW returns successfully. If THAW calls die, control transfers out of decode_tag via Perl's exception mechanism and both scalars remain allocated for the lifetime of the process.
The argument array val can contain arbitrarily nested JSON structures. An attacker who controls document content chooses the leak size per request. Each rejected document contributes additional heap pressure.
Root Cause
The root cause is missing lifetime management around a scope that can exit through a Perl exception. The pre-patch code performed ENTER; SAVETMPS; before pushing arguments but did not register tag and val with Perl's save stack. When THAW croaks, Perl unwinds without decrementing refcounts on these scalars.
Attack Vector
Any service that decodes untrusted JSON with allow_tags enabled and catches decoder exceptions is exposed. The attacker submits documents referencing a class whose THAW method dies, or an unknown class, in a tight loop. Each rejected document leaks the decoded argument structure.
ERR ("cannot decode perl-object (package does not have a THAW method)");
ENTER; SAVETMPS;
+ SAVEFREESV (tag); /* also freed when THAW dies */
+ SAVEFREESV (val);
PUSHMARK (SP);
EXTEND (SP, len + 2);
/* we re-bless the reference to get overload and other niceties right */
Source: GitHub Patch Commit
The fix adds SAVEFREESV(tag) and SAVEFREESV(val) so Perl's save stack releases both scalars on scope exit, including when THAW dies.
Detection Methods for CVE-2026-110685
Indicators of Compromise
- Steady growth in resident set size (RSS) of Perl worker processes that handle JSON input over hours or days without a matching workload increase.
- Repeated application log entries recording caught decode exceptions originating from Cpanel::JSON::XS::decode.
- Inbound JSON payloads containing tagged-value syntax such as ("ClassName")[...] from untrusted sources.
Detection Strategies
- Audit code for calls to allow_tags, allow_tags(1), or decoders configured with filter_json_single_key_object combined with blessing, and verify the installed Cpanel::JSON::XS version is 4.80 or later.
- Correlate process memory growth with log patterns matching eval { ... decode ... } error handling to identify affected services.
- Reproduce behavior in staging using the regression test shipped with the patch, which asserts the tagged argument is freed after THAW dies.
Monitoring Recommendations
- Alert on sustained upward RSS trends in long-running Perl workers that process external JSON.
- Monitor rate of JSON decode errors per source IP; a single client producing many decode exceptions is a strong signal.
- Collect and review the regression test output from t/130_thaw_croak_leak.t after upgrades to confirm the fix is in place.
+use strict;
+use Test::More tests => 1;
+
+use Cpanel::JSON::XS;
+
+my $freed = 0;
+sub Marker::DESTROY { $freed++ }
+sub Rejects::THAW { die "rejected\n" }
+
+my $json = Cpanel::JSON::XS->new->allow_tags
+ ->filter_json_single_key_object(m => sub { bless {}, 'Marker' });
+eval { $json->decode('("Rejects")[{"m":1}]') };
+is( $freed, 1, "Properly freed" );
Source: GitHub Patch Commit
How to Mitigate CVE-2026-110685
Immediate Actions Required
- Upgrade Cpanel::JSON::XS to version 4.80 or later across all Perl runtimes that decode untrusted input.
- Inventory services using allow_tags and prioritize patching long-running daemons that catch decode exceptions.
- Restart affected worker processes after upgrade to reclaim memory already leaked.
Patch Information
The fix is commit 9ab010221c069a7af9ef7463454ecd3b8ace9c58 in the upstream repository and ships in release 4.80. Review the MetaCPAN Release Changes and the GitHub Patch Commit for details.
Workarounds
- Disable allow_tags on decoders that process untrusted input until the upgrade is applied.
- Terminate the worker process on decode failure instead of catching the exception and continuing, which prevents cumulative leakage.
- Place a size-limiting reverse proxy or input validator in front of services that must accept tagged JSON to cap the per-request leak surface.
# Upgrade Cpanel::JSON::XS to the fixed release
cpanm Cpanel::JSON::XS@4.80
# Verify installed version
perl -MCpanel::JSON::XS -E 'say $Cpanel::JSON::XS::VERSION'
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

