CVE-2025-40929
BaseFortify
Publication date: 2025-09-08
Last updated on: 2025-11-04
Assigner: CPANSec
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| cpanel | json_xs | * |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-122 | A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc(). |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is an integer buffer overflow in the Cpanel::JSON::XS Perl module before version 4.40. It occurs when parsing specially crafted JSON input containing excessively long numeric strings. The flaw is due to incorrect character comparisons during the parsing of floating-point numbers, which can lead to a stack overflow or segmentation fault (crash) when processing malformed or fuzzed JSON data. [1]
How can this vulnerability impact me? :
The vulnerability can cause denial-of-service attacks by crashing applications that use the affected JSON parser when they process maliciously crafted JSON input. This can disrupt service availability or potentially lead to other unspecified impacts due to the integer buffer overflow and resulting segfault. [1]
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by testing the JSON parsing functionality of the affected Cpanel::JSON::XS Perl module with crafted JSON inputs containing excessively long numeric strings or malformed floating-point numbers that trigger the integer buffer overflow and cause a segfault. Specific detection commands are not provided in the resources, but fuzzing JSON inputs targeting floating-point number parsing could reveal the issue. [1]
What immediate steps should I take to mitigate this vulnerability?
The immediate mitigation step is to update Cpanel::JSON::XS to version 4.40 or later, which includes the patch fixing the integer buffer overflow in the json_atof_scan1 function. This patch corrects digit character checks and prevents overflow conditions when parsing malformed JSON numbers, thereby preventing denial-of-service attacks. [1]