---
id: "CVE-2026-110687"
kind: "vulnerability"
aliases: ["CVE-2026-110687"]
title: "Cpanel::JSON::XS: canonical encoding sorts some keys wrongly"
severity: "low"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["canonical-json", "cpanel-json-xs", "package", "perl", "signing"]
not_affected_if: ["no-canonical-encoding", "versions-outside-4.43-4.80"]
published_at: "2026-10-19T19:17:22+00:00"
first_seen_at: "2026-10-23T21:57:18+00:00"
updated_at: "2026-10-25T05:10:41+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-110687", "first_seen_at": "2026-10-23T21:57:18+00:00"}]
---

# Cpanel::JSON::XS: canonical encoding sorts some keys wrongly

Versions of the Perl Cpanel::JSON::XS module from 4.43 before 4.80 sort hash keys incorrectly when producing canonical JSON, if a hash mixes UTF-8 flagged keys with byte-string keys. The same data can therefore encode to different canonical documents in different processes, which can break signatures or hash checks that rely on canonical output.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed version with `perl -MCpanel::JSON::XS -e 'print $Cpanel::JSON::XS::VERSION'`
- Search dependency files for `Cpanel::JSON::XS` and confirm whether canonical output is used for signing or hashing

## Fix

- Upgrade Cpanel::JSON::XS to `4.80` or later
- Unknown whether a workaround exists short of upgrading

## Timeline

- 2026-10-23T21:57:18+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-110687

## From the sources

Cpanel::JSON::XS versions from 4.43 before 4.80 for Perl misorder byte-string keys during canonical encoding in utf16_cmp.

canonical sorts keys by UTF-16 code units. When any key in a hash is UTF-8 flagged, every key is decoded as UTF-8 for the comparison, including byte-string keys that the encoder writes out as Latin-1 characters. A byte-string key whose bytes are valid UTF-8 is sorted out of order, and two keys that encode differently can compare equal and are left in hash order.

The same data can encode to different canonical documents across processes.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
