Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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-7339

CVE-2025-7339: on-headers Header Modification Vulnerability

CVE-2025-7339 is a header modification flaw in on-headers node.js middleware that causes unintended response header changes when arrays are passed. This article covers technical details, affected versions, and patches.

Updated: January 22, 2026

CVE-2025-7339 Overview

CVE-2025-7339 is an Input Validation Error vulnerability in the on-headers Node.js middleware package. This middleware is used for listening to when a response writes headers. A bug in versions prior to 1.1.0 may result in response headers being inadvertently modified when an array is passed to response.writeHead(). This improper handling of data types (CWE-241: Improper Handling of Unexpected Data Type) can lead to unintended header modifications that could affect application behavior.

Critical Impact

Response headers may be inadvertently modified when arrays are passed to response.writeHead(), potentially causing unexpected application behavior and minor confidentiality or integrity impacts.

Affected Products

  • on-headers Node.js middleware versions prior to 1.1.0
  • Applications using the morgan Express.js logging middleware (which depends on on-headers)
  • Node.js applications utilizing response.writeHead() with array parameters

Discovery Timeline

  • July 17, 2025 - CVE-2025-7339 published to NVD
  • July 17, 2025 - Last updated in NVD database

Technical Details for CVE-2025-7339

Vulnerability Analysis

The vulnerability exists in the on-headers middleware's handling of the response.writeHead() function. When developers pass an array to this function instead of an object, the middleware fails to properly process the header data, resulting in inadvertent modifications to response headers. This represents an Improper Handling of Unexpected Data Type issue (CWE-241).

The local attack vector requires privileged access to the affected system or application code to exploit. The vulnerability could result in minor confidentiality and integrity impacts through header manipulation, though availability is not affected.

Root Cause

The root cause stems from insufficient type checking in the on-headers middleware when processing parameters passed to response.writeHead(). The code does not properly distinguish between array and object data types when handling header information, leading to unexpected behavior when an array is provided where an object is expected.

Attack Vector

The attack vector is local, requiring the attacker to have high privileges on the affected system. An attacker with access to modify application code or influence the parameters passed to response.writeHead() could potentially cause response headers to be modified in unintended ways. This could lead to minor information leakage or integrity issues with HTTP headers.

The vulnerability manifests when an array is passed to response.writeHead() within applications using affected versions of the on-headers middleware. For technical implementation details, refer to the GitHub Security Advisory GHSA-76c9-3jph-rj3q and the fix commit.

Detection Methods for CVE-2025-7339

Indicators of Compromise

  • Unexpected or malformed HTTP response headers in application logs
  • Applications using on-headers versions below 1.1.0 in package.json or package-lock.json
  • Code patterns showing arrays passed to response.writeHead() in conjunction with the on-headers middleware

Detection Strategies

  • Audit package.json and package-lock.json files for on-headers dependency versions below 1.1.0
  • Implement software composition analysis (SCA) tools to identify vulnerable npm packages
  • Review application code for usage patterns involving response.writeHead() with array parameters
  • Monitor HTTP response headers for unexpected modifications or anomalies

Monitoring Recommendations

  • Enable detailed HTTP header logging to detect unexpected header modifications
  • Configure npm audit or similar dependency scanning tools to run in CI/CD pipelines
  • Set up alerts for applications using known vulnerable versions of on-headers
  • Implement runtime application self-protection (RASP) to monitor header manipulation

How to Mitigate CVE-2025-7339

Immediate Actions Required

  • Upgrade on-headers to version 1.1.0 or later immediately
  • Audit application code for instances where arrays are passed to response.writeHead()
  • Review and update any applications using the morgan logging middleware, which depends on on-headers
  • Verify that the upgrade is reflected in package-lock.json to prevent transitive dependency issues

Patch Information

The vulnerability has been patched in on-headers version 1.1.0. Users should upgrade to this version or later to receive the fix. The patch properly handles the data type checking when processing parameters passed to response.writeHead().

For more information, see the GitHub Security Advisory and the OpenJS Foundation Security Advisories.

Workarounds

  • Pass an object to response.writeHead() rather than an array until the upgrade can be applied
  • Refactor application code to use the object-based syntax for header specification
  • Implement input validation to ensure only objects are passed to response.writeHead()
bash
# Upgrade on-headers to patched version
npm update on-headers@1.1.0

# Verify the installed version
npm list on-headers

# Audit for additional vulnerabilities
npm audit

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

  • Vulnerability Details
  • TypeOther

  • Vendor/TechOn Headers

  • SeverityLOW

  • CVSS Score3.4

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-241
  • Technical References
  • OpenJS Foundation Security Advisories

  • GitHub Issue Tracker

  • GitHub Commit Change

  • GitHub Issue Discussion

  • GitHub Security Advisory GHSA-76c9-3jph-rj3q
  • Latest CVEs
  • CVE-2025-52793: Esselink.nu Settings CSRF Vulnerability

  • CVE-2025-52772: Virtual Moderator CSRF Vulnerability

  • CVE-2025-48279: WC MyParcel Belgium XSS Vulnerability

  • CVE-2025-39381: KiotViet Sync CSRF Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now 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