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-2025-3407

CVE-2025-3407: Nothings Stb Image.h RCE Vulnerability

CVE-2025-3407 is a critical remote code execution vulnerability in Nothings Stb Image.h caused by an out-of-bounds read flaw. This article covers technical details, affected versions, impact, and mitigation strategies.

Updated: May 14, 2026

CVE-2025-3407 Overview

CVE-2025-3407 is an out-of-bounds read vulnerability in the Nothings stb library, specifically affecting the stbhw_build_tileset_from_image function in stb_herringbone_wang_tile.h. The flaw stems from improper validation of the h_count and v_count arguments, which control tileset dimensions parsed from input images. The library follows a rolling release model, and the affected commit is f056911. The vendor was contacted prior to disclosure but did not respond. Applications and games that embed stb for procedural tile generation inherit this defect when they accept untrusted image inputs.

Critical Impact

Attackers can trigger out-of-bounds memory reads by supplying a crafted image with malicious h_count or v_count values, leading to information disclosure or process crashes in applications embedding the affected stb module.

Affected Products

  • Nothings stb (single-file header library collection)
  • stb_herringbone_wang_tile.h at commit f056911 and prior rolling releases
  • Downstream applications statically linking the vulnerable header

Discovery Timeline

  • 2025-04-08 - CVE-2025-3407 published to NVD
  • 2025-10-16 - Last updated in NVD database

Technical Details for CVE-2025-3407

Vulnerability Analysis

The vulnerability is classified under [CWE-119], improper restriction of operations within the bounds of a memory buffer. The stbhw_build_tileset_from_image function constructs a Wang tileset by iterating over a source image divided into h_count by v_count tiles. When these counts are not validated against the actual image dimensions, the function reads pixels outside the allocated image buffer.

Because stb is distributed as a header-only library and embedded directly into consumer applications, exploitation depends on whether the host application passes attacker-controlled values to the affected function. Many tools that use stb for asset processing accept tileset images from users, networks, or content pipelines.

The attack requires user interaction, such as opening a malicious tileset image, but does not require authentication or local access. The out-of-bounds read can leak adjacent heap memory or trigger an access violation that terminates the process.

Root Cause

The root cause is missing bounds validation on the h_count and v_count parameters before they are used to index into the image buffer. The function trusts caller-supplied tile counts and computes pixel offsets without verifying that the product of tile count and tile size remains within the image dimensions.

Attack Vector

The vulnerability is reachable over the network when an application using stb processes attacker-supplied tileset images. The attacker crafts an image with header metadata or parameter values that cause h_count or v_count to exceed valid ranges. When the host application invokes stbhw_build_tileset_from_image, the parser dereferences memory outside the image buffer.

No verified public proof-of-concept is available. Technical details are referenced in VulDB #303685.

Detection Methods for CVE-2025-3407

Indicators of Compromise

  • Unexpected crashes or segmentation faults in applications that process tileset or Wang tile images via stb
  • Anomalous memory access violations originating from modules statically linked with stb_herringbone_wang_tile.h
  • Malformed image files with implausible tile count fields received from untrusted sources

Detection Strategies

  • Audit source trees and build artifacts for embedded copies of stb_herringbone_wang_tile.h at or before commit f056911
  • Run fuzzing harnesses such as libFuzzer or AFL++ against stbhw_build_tileset_from_image with mutated h_count and v_count inputs
  • Enable AddressSanitizer (ASan) in development and CI builds to surface out-of-bounds reads during testing

Monitoring Recommendations

  • Monitor crash telemetry and Windows Error Reporting for repeated faults in image-processing components
  • Log and inspect ingestion pipelines that accept user-supplied tileset images for parser exceptions
  • Track upstream stb repository commits for an official patch addressing the bounds check

How to Mitigate CVE-2025-3407

Immediate Actions Required

  • Inventory all internal projects and dependencies that vendor stb_herringbone_wang_tile.h and identify those exposing it to untrusted input
  • Restrict the function to trusted, validated image sources until an upstream fix is published
  • Add caller-side validation to ensure h_count and v_count are consistent with the image width and height before invoking the function

Patch Information

No official patch is available at the time of writing. The stb project uses rolling releases, and the vendor has not responded to disclosure. Maintainers consuming the library should monitor the Nothings stb repository for fix commits and rebuild dependent binaries when available.

Workarounds

  • Reject tileset images whose declared tile counts do not divide evenly into image dimensions
  • Sandbox image parsing in a separate, low-privilege process to contain potential information disclosure
  • Apply a local patch enforcing h_count * tile_w <= image_w and v_count * tile_h <= image_h before any pixel access
bash
# Configuration example: locate vulnerable stb usage in a codebase
grep -rn "stbhw_build_tileset_from_image" ./src
grep -rn "stb_herringbone_wang_tile.h" ./third_party

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechNothings

  • SeverityMEDIUM

  • CVSS Score5.3

  • EPSS Probability0.25%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/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
  • IntegrityLow
  • AvailabilityLow
  • CWE References
  • CWE-119
  • Technical References
  • VulDB CTI ID #303685

  • VulDB #303685

  • VulDB Submission #544227
  • Related CVEs
  • CVE-2026-5316: Nothings stb RCE Vulnerability

  • CVE-2026-5315: Nothings stb RCE Vulnerability

  • CVE-2026-5186: stb_image.h Use-After-Free 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