Expected Behavior Violation Affecting davegamble/cjson package, versions [0,]


Severity

Recommended
0.0
low
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.01% (2nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-UNMANAGED-DAVEGAMBLECJSON-9802198
  • published24 Apr 2025
  • disclosed19 Apr 2025
  • creditUnknown

Introduced: 19 Apr 2025

NewCVE-2023-26819  (opens in a new tab)
CWE-440  (opens in a new tab)

How to fix?

A fix was pushed into the master branch but not yet published.

Overview

Affected versions of this package are vulnerable to Expected Behavior Violation in the form of the parse_number() function not complying with the JSON specification and failing on inputs longer than 64 bytes.

Note: The specification includes the following regarding the expected length of numbers:

This specification allows implementations to set limits on the range and precision of numbers accepted. Since software that implements IEEE 754-2008 binary64 (double precision) numbers [IEEE754] is generally available and widely used, good interoperability can be achieved by implementations that expect no more precision or range than these provide, in the sense that implementations will approximate JSON numbers within the expected precision. A JSON number such as 1E400 or 3.141592653589793238462643383279 may indicate potential interoperability problems, since it suggests that the software that created it expects receiving software to have greater capabilities for numeric magnitude and precision than is widely available.

Note that when such software is used, numbers that are integers and are in the range [-(2**53)+1, (2**53)-1] are interoperable in the sense that implementations will agree exactly on their numeric values.

CVSS Base Scores

version 4.0
version 3.1