HarborGuardharborguardDatabase
Back to search
HIGHCVE-2026-9516Published Modified CNA CPANSec

CVE-2026-9516: Cpanel::JSON::XS versions before 4.41 for Perl allow denial of service via UTF-8 BOM prefixed input when a decode filter callback throws

Cpanel::JSON::XS versions before 4.41 for Perl allow denial of service via UTF-8 BOM prefixed input when a decode filter callback throws. To skip a leading 3-byte UTF-8 BOM, decode_json() advances the input scalar's string pointer past the mark with SvPV_set() and restores it only on the normal return path. When decoding aborts through a Perl exception, for example a filter_json_object callback that croaks, the restore is skipped and the scalar is left with its string pointer offset into its own buffer and a shortened length. When that scalar is later freed, the allocator receives an invalid pointer and the interpreter aborts. A single BOM prefixed document decoded with a throwing filter callback crashes any caller.

Metrics

CVSS v3.1
7.5
Severity
HIGH
Fixed in
4.41
Affected Products
1

Get notified

Email me when this CVE is updated: new fix versions, severity changes, or any record change.

HarborGuard Analysis

Synopsis

A denial-of-service vulnerability exists in the Cpanel::JSON::XS Perl library before version 4.41. When a caller passes a UTF-8 BOM-prefixed JSON document to decode_json() alongside a filter callback that throws a Perl exception (croaks), the library's internal string pointer is left in a corrupted state, causing the interpreter to abort when the scalar is freed. The vulnerability is reachable over the network with no authentication required, and successful exploitation crashes the calling process. A patched-image rebuild at version 4.41 is available on HarborGuard for environments running an affected version.

HarborGuard Coverage

Detection

Detection capability is available across every HarborGuard environment; the CVE is matched against images in customer registries and CI pipelines within minutes of upstream feed publication, including custom-built images that bundle Cpanel::JSON::XS as a Perl dependency.

Available
Triage

HarborGuard is capable of scoring this finding at CVSS 7.5 (HIGH) and weighting it against each environment's compliance policy to route the alert to the appropriate team inbox inside a customer organization.

Available
Patch

A patched-image rebuild at Cpanel::JSON::XS 4.41 is available on HarborGuard for any image found to carry an affected version. For customers who opt into auto-remediation, HarborGuard rebuilds the image, runs a regression test suite, and opens a pull request against affected workloads automatically.

Available

Exploit Conditions

  • Network reachabilityRequired

    The vulnerable decode path is reachable over the network; an attacker can deliver a crafted BOM-prefixed JSON payload to any exposed HTTP endpoint or API that uses Cpanel::JSON::XS with a filter callback.

  • AuthenticationNot required

    No credentials or session token are needed; the attacker only needs to submit a JSON document to the target service.

  • Victim interactionNot required

    No user action is required; the crash is triggered entirely by the server processing the malicious input.

  • Attack complexityDetail

    The exploit is reliable and condition-free; a single well-formed BOM-prefixed document paired with a throwing filter callback is sufficient to crash the process every time.

Blast Radius

  • Crashes the Perl interpreter process handling the request, taking down any co-located request handling for the duration of the restart cycle.
  • A persistent or scripted stream of such requests keeps the service unavailable, resulting in sustained denial of service.
  • No confidential data is disclosed and no data is modified; the impact is limited to availability.

How HarborGuard Handles This

Available on HarborGuard: detection is performed against all scanned images within minutes of CVE publication, and a patched-image rebuild at Cpanel::JSON::XS 4.41 is ready for any environment found to be running an affected version. For customers who opt into auto-remediation, the typical flow is a rebuilt image, a regression test run, and a PR opened against affected workloads; median time from CVE publication to merged patch PR for high-severity issues is around 90 minutes for environments with auto-remediation enabled. Where compliance policy requires manual approval, the rebuilt image and test results are surfaced in the HarborGuard dashboard for review. Because the crash requires both a BOM-prefixed document and a throwing filter callback, teams that cannot immediately patch can reduce exposure by adding network-policy controls to restrict which services accept arbitrary JSON payloads from untrusted sources, and by auditing whether filter_json_object or filter_json_single_key_object callbacks in their codebase can raise exceptions on attacker-supplied input.

See how HarborGuard automates this

Fix available

4.41
Patch commits
Affected packages
  • RURBAN / Cpanel::JSON::XS
    < 4.41 (from 0)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H