Cyber 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.0036 29th percentile
Risk Priority 57 floored blend · peak EPSS

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 Exploitation for Privilege Escalation (T1068); ranked at the 29th 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

T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
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.
T1212 Exploitation for Credential Access Credential Access
Adversaries may exploit software vulnerabilities in an attempt to collect credentials.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-32316Same product: Jqlang Jq
CVE-2026-39956Same product: Jqlang Jq
CVE-2026-39979Same product: Jqlang Jq
CVE-2026-33948Same product: Jqlang Jq
CVE-2024-23337Same product: Jqlang Jq
CVE-2026-54679Same product: Jqlang Jq
CVE-2026-43894Same product: Jqlang Jq
CVE-2026-49839Same product: Jqlang Jq
CVE-2026-41257Same product: Jqlang Jq
CVE-2023-49355Same 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
  • V3.2.3
  • V15.3.5

Mitigating Controls (NIST 800-53 r5) AI

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) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

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) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

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

prevents

Secure SDLC mandates type-safe design and review that can catch type-confusion flaws.

prevents

Application security requirements can specify strong typing and interface contracts that reduce type confusion.

prevents

Secure architecture principles promote type-safe languages and memory-safety mechanisms that mitigate type confusion.

prevents

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

References