CPANSA-Cpanel-JSON-XS-2026-9334: Cpanel-JSON-XS vulnerability
| Publisher | giterlizzi | Document category | csaf_security_advisory |
|---|---|---|---|
| Initial release date | 2026-06-03T00:00:00 | Engine | CSAF Perl Toolkit 0.26 |
| Current release date | 2026-06-03T00:00:00 | Build Date | |
| Current version | 1 | Status | final |
| CVSS v3.1 Base Score | 7.3 | Severity | |
| Original language | Language | en | |
| Also referred to | |||
Vulnerability Description
Cpanel::JSON::XS versions before 4.41 for Perl allow type confusion via duplicate object keys when dupkeys_as_arrayref is enabled. decode_hv() collapses duplicate object keys into an array reference under dupkeys_as_arrayref. The branch reached for a duplicate key tests `SvTYPE (old_value) != SVt_RV && SvTYPE (SvRV (old_value)) != SVt_PVAV`, which evaluates SvRV(old_value) before establishing that old_value is a reference. When the existing value is a plain scalar rather than an array reference, a non-reference scalar is dereferenced as a reference. A caller decoding untrusted JSON with dupkeys_as_arrayref enabled is crashed, and the incompatible access follows a pointer taken from attacker controlled scalar contents.
Vulnerabilities
CVE-2026-9334
Vulnerability DescriptionCpanel::JSON::XS versions before 4.41 for Perl allow type confusion via duplicate object keys when dupkeys_as_arrayref is enabled.
decode_hv() collapses duplicate object keys into an array reference under dupkeys_as_arrayref. The branch reached for a duplicate key tests `SvTYPE (old_value) != SVt_RV && SvTYPE (SvRV (old_value)) != SVt_PVAV`, which evaluates SvRV(old_value) before establishing that old_value is a reference. When the existing value is a plain scalar rather than an array reference, a non-reference scalar is dereferenced as a reference.
A caller decoding untrusted JSON with dupkeys_as_arrayref enabled is crashed, and the incompatible access follows a pointer taken from attacker controlled scalar contents.
| Weakness | CWE-843 : Access of Resource Using Incompatible Type ('Type Confusion') |
|---|
Product status
Known affected
| Product | Score | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Cpanel-JSON-XS less than 4.41 |
|
Fixed
- Cpanel-JSON-XS greater than or equal 4.41
giterlizzi
Namespace: https://github.com/giterlizzi/
gdt@cpan.org
References
- CPANSA-Cpanel-JSON-XS-2026-9334 JSON self
https://raw.githubusercontent.com/giterlizzi/perl-CPANSA-CSAF/develop/csaf/white/2026/cpansa-cpanel-json-xs-2026-9334.json - https://github.com/rurban/Cpanel-JSON-XS/commit/11a7c550a0d8fac2f84414f24d5df9b2bfe346e2.patch external
https://github.com/rurban/Cpanel-JSON-XS/commit/11a7c550a0d8fac2f84414f24d5df9b2bfe346e2.patch - https://metacpan.org/release/RURBAN/Cpanel-JSON-XS-4.41/changes external
https://metacpan.org/release/RURBAN/Cpanel-JSON-XS-4.41/changes - http://www.openwall.com/lists/oss-security/2026/06/03/4 external
http://www.openwall.com/lists/oss-security/2026/06/03/4 - CVE-2026-9334 (NVD) external
https://nvd.nist.gov/vuln/detail/CVE-2026-9334
Revision history
| Version | Date of the revision | Summary of the revision |
|---|---|---|
| 1 | Wed Jun 3 00:00:00 2026 | First release |
Sharing rules
TLP:WHITE
For the TLP version see: https://www.first.org/tlp/