The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-40612

CVE-2026-40612: Jqlang Jq DOS Vulnerability

CVE-2026-40612 is a denial of service flaw in Jqlang Jq affecting version 1.8.1 and earlier. Deeply nested arrays exhaust the C stack causing crashes. This article covers technical details, affected versions, and fixes.

Published: May 18, 2026

CVE-2026-40612 Overview

CVE-2026-40612 is a stack exhaustion vulnerability in jq, the widely deployed command-line JSON processor maintained by jqlang. Versions 1.8.1 and earlier contain an unbounded recursion in the jv_contains function, which descends into nested arrays and objects without a depth limit. An attacker who can supply a sufficiently nested JSON structure can exhaust the C stack and crash the process. The issue is tracked under CWE-674: Uncontrolled Recursion and was disclosed through a GitHub Security Advisory.

Critical Impact

A locally supplied nested JSON input crafted with reduce triggers unbounded recursion in jv_contains, exhausting the C stack and causing denial of service in any pipeline that invokes jq with contains semantics on untrusted input.

Affected Products

  • jqlang jq 1.8.1
  • jqlang jq all prior 1.x releases
  • Any tooling, CI pipeline, or shell script that pipes untrusted JSON into jq with contains-based filters

Discovery Timeline

  • 2026-05-11 - CVE-2026-40612 published to NVD
  • 2026-05-13 - Last updated in NVD database

Technical Details for CVE-2026-40612

Vulnerability Analysis

The defect resides in jv_contains, the internal routine that implements the contains builtin in jq. The function walks both operands recursively to determine whether one JSON value is contained within another. Each level of nesting consumes one C stack frame, and the implementation enforces no depth ceiling.

The JSON parser in jq does cap nesting at depth 10000, which would normally bound the recursion. However, values constructed at runtime using reduce bypass that parser-side limit. An attacker who can influence a jq program or its input can therefore build a structure deep enough to overflow the thread stack, terminating the process with a segmentation fault.

Root Cause

The root cause is missing depth tracking inside jv_contains. The function relies implicitly on the parser cap rather than enforcing its own iterative bound or explicit recursion guard. Once the runtime-constructed value exceeds the available stack, the host operating system delivers SIGSEGV and jq terminates abnormally.

Attack Vector

Exploitation requires local access and user interaction, consistent with the published CVSS 4.0 vector. The realistic delivery path is an automation pipeline, a CI job, or a developer workflow that invokes jq against attacker-influenced JSON or attacker-supplied filter expressions. The impact is confined to availability: jq crashes, breaking the pipeline. No confidentiality or integrity loss is described in the advisory, and no public proof of concept or exploit is currently catalogued.

For technical detail on the recursion path and the reduce-based construction pattern, refer to the jqlang security advisory GHSA-r7m6-x9c7-h69j.

Detection Methods for CVE-2026-40612

Indicators of Compromise

  • jq processes terminating with SIGSEGV or exit code 139 when processing JSON inputs.
  • Crash dumps or dmesg entries referencing jq and a stack overflow in jv_contains.
  • CI/CD job failures correlated with unusually large or deeply nested JSON payloads.

Detection Strategies

  • Inventory hosts and container images running jq at version 1.8.1 or earlier using software composition analysis or package manager queries (jq --version, dpkg -l jq, rpm -q jq).
  • Alert on repeated abnormal terminations of jq in build agents, log processors, and data pipelines.
  • Inspect jq filter strings in source repositories for contains usage applied to untrusted input without prior depth validation.

Monitoring Recommendations

  • Forward process exit telemetry and core-dump events from Linux endpoints and build infrastructure to a central analytics tier for correlation.
  • Track outbound jq invocations in container workloads and flag those consuming JSON from external HTTP sources.
  • Monitor package inventory drift to confirm patched jq versions remain deployed after remediation.

How to Mitigate CVE-2026-40612

Immediate Actions Required

  • Upgrade jq to a release later than 1.8.1 as soon as the jqlang project publishes a fixed version; track the GHSA-r7m6-x9c7-h69j advisory for the patched build.
  • Audit pipelines that feed external JSON into jq and constrain input size and nesting at the ingress layer.
  • Run jq under resource limits so a crash cannot cascade into broader service disruption.

Patch Information

The jqlang maintainers tracked remediation through GitHub Security Advisory GHSA-r7m6-x9c7-h69j. Consult the advisory for the fixed release tag and apply the upgrade through your distribution package manager or container base image refresh once available.

Workarounds

  • Pre-validate JSON inputs with a streaming parser that enforces a strict maximum nesting depth before invoking jq.
  • Avoid contains against untrusted values; substitute equality checks or explicit field comparisons where feasible.
  • Execute jq inside a sandbox with ulimit -s reduced and CPU and memory caps applied so a stack overflow terminates only the isolated process.
bash
# Constrain jq execution to limit blast radius of a stack-exhaustion crash
ulimit -s 2048      # cap stack size (KB) for the current shell
ulimit -t 10        # cap CPU seconds
ulimit -v 262144    # cap virtual memory (KB)

# Reject inputs above a conservative size threshold before piping to jq
MAX_BYTES=1048576
if [ "$(wc -c < input.json)" -gt "$MAX_BYTES" ]; then
  echo "input too large" >&2
  exit 1
fi

jq '.field | contains("value")' input.json

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechJqlang Jq

  • SeverityMEDIUM

  • CVSS Score5.4

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-674
  • Vendor Resources
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-43896: Jqlang Jq DOS Vulnerability

  • CVE-2026-44777: Jqlang Jq RCE Vulnerability

  • CVE-2026-43895: Jqlang Jq Path Traversal Vulnerability

  • CVE-2026-43894: Jqlang Jq Buffer Overflow Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English