Security Resilience

CVE-2024-53427

Memory Safety in Jqlang Jq ≤ 1.7.1

Public PoCMemory Safety
Published
26 February 2025
Modified
01 July 2025
Patch / advisory
CVSS Score v3.1 8.1
Click a component to see what it means
Raw vectorCVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
EPSS Score 0.0039 34th percentile
Risk Priority 57 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2024-53427 is a high-severity Type Confusion (CWE-843) vulnerability in Jqlang Jq. Its CVSS base score is 8.1 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Drive-by Compromise (T1189); ranked at the 34th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SA-8 (Security and Privacy Engineering Principles) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

CVE-2024-53427 is a stack-based buffer overflow and out-of-bounds write vulnerability in the decNumberCopy function within decNumber.c, affecting jq versions through 1.7.1. The flaw occurs because the function does not properly account for NaN values being interpreted as numeric, leading to improper handling during operations.

A local attacker with no privileges required can exploit this vulnerability, though it demands high attack complexity and no user interaction. Exploitation is triggered via the --slurp option with a subtraction filter such as .-. applied to crafted input, like a digit string containing NaN (e.g., "1 NaN123" immediately followed by many more digits). This results in high impacts to confidentiality, integrity, and availability with a changed scope, as reflected in the CVSS v3.1 base score of 8.1 (AV:L/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H) and mapped to CWE-843 (Access of Resource Using Incompatible Type).

The jq security advisory at GHSA-x6c3-qv5r-7q22, along with GitHub issues #3196 and #3296, provide further details on the vulnerability, including a proof-of-concept in a referenced Gist and analysis of the affected source code line in decNumber.c. Practitioners should consult these resources for patch information and mitigation guidance.

EU & UK References

Vulnerability Data

decNumberCopy in decNumber.c in jq through 1.7.1 does not properly consider that NaN is interpreted as numeric, which has a resultant stack-based buffer overflow and out-of-bounds write, as demonstrated by use of --slurp with subtraction, such as a filter of…

more

.-. when the input has a certain form of digit string with NaN (e.g., "1 NaN123" immediately followed by many more digits).

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

MITRE ATT&CK v20.0

T1189 Drive-by Compromise Initial Access
Adversaries may gain access to a system through a user visiting a website over the normal course of browsing.
T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1203 Exploitation for Client Execution Execution
Adversaries may exploit software vulnerabilities in client applications to execute code.
T1210 Exploitation of Remote Services Lateral Movement
Adversaries may exploit remote services to gain unauthorized access to internal systems once inside of a network.
T1499 Endpoint Denial of Service Impact
Adversaries may perform Endpoint Denial of Service (DoS) attacks to degrade or block the availability of services to users.
T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-39956Same product: Jqlang Jq
CVE-2024-23337Same product: Jqlang Jq
CVE-2026-54679Same product: Jqlang Jq
CVE-2026-43894Same product: Jqlang Jq
CVE-2026-32316Same product: Jqlang Jq
CVE-2023-49355Same product: Jqlang Jq
CVE-2026-49839Same product: Jqlang Jq
CVE-2026-41257Same product: Jqlang Jq
CVE-2023-50246Same product: Jqlang Jq
CVE-2025-48060Same product: Jqlang Jq

Affected Assets

jqlang
jq
≤ 1.7.1

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

—

Detect
Catch it (NIST detect / respond)

—

Harden
Shrink the surface (DISA STIG)

—

Validate
Prove the fix (OWASP ASVS)
  • V1.5.2
  • V15.3.5

Mitigating Controls (NIST 800-53 r5)

Our mappings, made for this CVE.

Developer testing and evaluation (including fuzzing and type-aware analysis) directly finds type-confusion flaws before deployment.

Engineering principles can require use of type-safe languages, static typing, and runtime type checks that structurally avoid allocating one type and accessing another.

Memory-protection controls limit the blast radius when a type-confusion access occurs but do not stop the flaw itself.

Mitigating Controls (NIST CSF 2.0)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.

PR.PS-06 mostly match
blocks

Secure SDLC practices directly prevent type-confusion flaws via safe typing, static analysis, and code review while the control itself addresses many additional weaknesses.

Mitigating Controls (ISO/IEC 27001:2022 Annex A)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.

finds

Security testing in development can detect type-confusion vulnerabilities through fuzzing and static analysis.

removes

A.8.19 governs the installation and update process for operational software, ensuring only approved, tested code is deployed and unsupported components are removed, but it does not inspect or alter the internal type-safety logic of that code, so a type confusion defect already present in the source is not removed by the installation control.

prevents

Secure coding standards directly forbid unsafe type casts and require static-analysis checks for type confusion.

prevents

A.8.30 carries its effect through the secure-development practices its contract requires of the supplier (8.25 to 8.29), so it reduces ordinary software implementation weaknesses in delivered code the way those practices do; type confusion is a regular implementation defect that secure coding practice addresses, but the clause mandates a practice rather than a mechanism, leaving a nameable remainder.

finds

A.8.8's reach is disclosure-based: it finds type confusion where it surfaces as a published CVE in third-party components (the observed examples show CVEs do exist for this class), but misses first-party code entirely (that is A.8.29's domain) and the research-gap note indicates many type confusion instances are reported as 'memory corruption' rather than type confusion specifically, shrinking the disclosed share.

References