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-39979

CVE-2026-39979: jq JSON Processor Buffer Overflow Flaw

CVE-2026-39979 is a buffer overflow vulnerability in jq, a command-line JSON processor. The flaw allows out-of-bounds reads when processing malformed JSON, potentially exposing memory or crashing processes.

Published: April 17, 2026

CVE-2026-39979 Overview

CVE-2026-39979 is an out-of-bounds read vulnerability affecting jq, a widely-used command-line JSON processor. The vulnerability exists in the jv_parse_sized() API within the libjq library, where the error-handling path incorrectly formats input buffers using %s in jv_string_fmt(). This function reads until a NUL terminator is found rather than respecting the caller-supplied length parameter, resulting in out-of-bounds memory access when processing malformed JSON in non-NUL-terminated buffers.

Critical Impact

When malformed JSON is passed in a non-NUL-terminated buffer, the error construction logic can read past the end of the buffer, potentially leading to memory disclosure or process termination.

Affected Products

  • jq (libjq library) - versions prior to commit 2f09060afab23fe9390cce7cb860b10416e1bf5f
  • Applications consuming the libjq library via jv_parse_sized() API
  • Systems processing untrusted JSON input through jq

Discovery Timeline

  • 2026-04-13 - CVE-2026-39979 published to NVD
  • 2026-04-14 - Last updated in NVD database

Technical Details for CVE-2026-39979

Vulnerability Analysis

This vulnerability is classified as CWE-125 (Out-of-Bounds Read). The flaw resides in the error handling logic of the jv_parse_sized() function within libjq. When this API receives a counted buffer with an explicit length parameter and encounters malformed JSON, the error construction code path uses jv_string_fmt() with a %s format specifier. This format specifier reads the input buffer as a null-terminated string, ignoring the length parameter provided by the caller.

The vulnerability is reachable by any libjq consumer that calls jv_parse_sized() with untrusted input data in a non-NUL-terminated buffer. Depending on the memory layout at runtime, successful exploitation can result in information disclosure (reading sensitive data from adjacent memory) or denial of service through process crashes.

Root Cause

The root cause is improper handling of the buffer length parameter during error message construction. The jv_string_fmt() function uses the %s format specifier which expects a null-terminated string, but the jv_parse_sized() API is designed to work with counted buffers that may not be null-terminated. This mismatch between the API contract and the error handling implementation creates the out-of-bounds read condition.

Attack Vector

The vulnerability can be exploited remotely over the network by any application that processes untrusted JSON input via the libjq library. An attacker can craft malformed JSON input that triggers the error handling path in jv_parse_sized(), causing the library to read beyond the allocated buffer boundaries. The attack does not require authentication or user interaction, as it only requires the ability to supply malicious JSON data to an affected application.

c
// Security patch in src/jv_parse.c - Fix out-of-bounds read in jv_parse_sized()
// Source: https://github.com/jqlang/jq/commit/2f09060afab23fe9390cce7cb860b10416e1bf5f
 
   if (!jv_is_valid(value) && jv_invalid_has_msg(jv_copy(value))) {
     jv msg = jv_invalid_get_msg(value);
-    value = jv_invalid_with_msg(jv_string_fmt("%s (while parsing '%s')",
+    value = jv_invalid_with_msg(jv_string_fmt("%s (while parsing '%.*s')",
                                               jv_string_value(msg),
+                                              length,
                                               string));
     jv_free(msg);
   }

The fix changes the format specifier from %s to %.*s, which allows specifying a maximum length for the string to be printed. The length parameter is now explicitly passed to ensure the format function respects the buffer boundaries.

Detection Methods for CVE-2026-39979

Indicators of Compromise

  • Unexpected process crashes in applications using libjq for JSON parsing
  • Memory access violations or segmentation faults during JSON processing operations
  • Abnormal memory patterns in application logs indicating out-of-bounds read attempts

Detection Strategies

  • Monitor for crash dumps or core files from applications that use the jq library or libjq
  • Implement AddressSanitizer (ASan) or similar memory debugging tools in development environments to catch out-of-bounds read attempts
  • Review application logs for error messages containing unusually long or corrupted JSON parsing output

Monitoring Recommendations

  • Deploy endpoint detection capabilities to monitor for abnormal process terminations in applications using libjq
  • Implement input validation and sanitization for JSON data before passing to jv_parse_sized() API
  • Enable crash reporting mechanisms to capture and analyze any jq-related process failures

How to Mitigate CVE-2026-39979

Immediate Actions Required

  • Update jq to a version containing commit 2f09060afab23fe9390cce7cb860b10416e1bf5f or later
  • Review applications that consume the libjq library and update dependencies accordingly
  • Implement input validation to ensure JSON data is properly sanitized before processing
  • Consider using null-terminated buffers as a temporary workaround until patching is complete

Patch Information

The vulnerability has been addressed in commit 2f09060afab23fe9390cce7cb860b10416e1bf5f. The fix modifies the format specifier in jv_string_fmt() from %s to %.*s and passes the explicit length parameter to respect buffer boundaries during error message construction. Organizations should apply this patch or update to a version that includes this fix. Additional details are available in the GitHub Security Advisory GHSA-2hhh-px8h-355p.

Workarounds

  • Ensure all buffers passed to jv_parse_sized() are null-terminated as a defensive measure
  • Implement wrapper functions that validate and sanitize input before calling libjq parsing APIs
  • Consider using alternative JSON parsing libraries that properly handle counted buffers until the patch can be applied
bash
# Configuration example
# Update jq from source with the security patch
git clone https://github.com/jqlang/jq.git
cd jq
git checkout 2f09060afab23fe9390cce7cb860b10416e1bf5f
autoreconf -fi
./configure
make
sudo make install

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

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechLibjq

  • SeverityMEDIUM

  • CVSS Score6.9

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/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
  • AvailabilityLow
  • CWE References
  • CWE-125
  • Technical References
  • GitHub Commit Update

  • GitHub Security Advisory GHSA-2hhh-px8h-355p
  • Latest CVEs
  • CVE-2026-46333: Linux Kernel Privilege Escalation Flaw

  • CVE-2026-2586: Eclipse Glassfish RCE Vulnerability

  • CVE-2026-2587: Eclipse Glassfish RCE Vulnerability

  • CVE-2026-45255: FreeBSD bsdinstall/bsdconfig RCE Flaw
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