# CVE-2026-9334: Cpanel::JSON::XS versions before 4.41 for Perl allow type confusion via duplicate object keys when dupkeys_as_arrayref is enabled

- Severity: High 7.3 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.25%, higher than 17% of CVEs (2026-12-02)
- Published: 2026-06-03T00:15:16.202Z
- Modified: 2026-07-21T19:10:00.107Z
- Weaknesses: CWE-843
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: CPANSec

## 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.

(As written by CVE List.)

## Affected

- Cpanel-JSON-XS: before 4.41
- rurban cpanel::json::xs: before 4.41

## References

- <https://github.com/rurban/Cpanel-JSON-XS/commit/11a7c550a0d8fac2f84414f24d5df9b2bfe346e2.patch> (patch)
- <https://metacpan.org/release/RURBAN/Cpanel-JSON-XS-4.41/changes> (release-notes)
- <http://www.openwall.com/lists/oss-security/2026/06/03/4> (mailing-list, patch, third-party-advisory)

## Sources

- CVE List: [CVE-2026-9334](https://www.cve.org/CVERecord?id=CVE-2026-9334), CVE Terms of Use, modified 2026-06-03
- NVD: [CVE-2026-9334](https://nvd.nist.gov/vuln/detail/CVE-2026-9334), Public domain, modified 2026-07-21

---

Page: https://cve.day/CVE-2026-9334 · Whole record: https://cve.day/CVE-2026-9334.json · Rebuilt by cve.day 2026-11-25T22:59:23.622Z
