Vulnerability · Published Jul 17, 2025 · Assigned by openjs
CVE-2025-7339on-headers vulnerable to http response header manipulation
Low 3.4
In plain English
A low-severity security flaw in on-headers from jshttp. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 11% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
on-headers is a node.js middleware for listening to when a response writes headers. A bug in on-headers versions `<1.1.0` may result in response headers being inadvertently modified when an array is passed to `response.writeHead()`. Users should upgrade to version 1.1.0 to receive a patch. Uses are strongly encouraged to upgrade to `1.1.0`, but this issue can be worked around by passing an object to `response.writeHead()` rather than an array.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | node-on-headers | no fix listed | DEBIAN-CVE-2025-7339 |
| Debian:13 | node-on-headers | 1.0.2-4 | DEBIAN-CVE-2025-7339 |
| Debian:14 | node-on-headers | 1.0.2-4 | DEBIAN-CVE-2025-7339 |
| Ubuntu:22.04:LTS | node-on-headers | no fix listed | UBUNTU-CVE-2025-7339 |
| Ubuntu:24.04:LTS | node-on-headers | no fix listed | UBUNTU-CVE-2025-7339 |
| Ubuntu:25.10 | node-on-headers | no fix listed | UBUNTU-CVE-2025-7339 |
| Ubuntu:26.04:LTS | node-on-headers | no fix listed | UBUNTU-CVE-2025-7339 |
| Ubuntu:26.10 | node-on-headers | no fix listed | UBUNTU-CVE-2025-7339 |
| npm | on-headers | 1.1.0 | GHSA-76c9-3jph-rj3q |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| jshttp | on-headers | 0 – before 1.1.0 |
Weakness: CWE-241 · Vector: CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:N
References
- https://github.com/jshttp/on-headers/security/advisories/GHSA-76c9-3jph-rj3q
- https://github.com/jshttp/on-headers/commit/c6e384908c9c6127d18831d16ab0bd96e1231867
- https://cna.openjsf.org/security-advisories.html
- https://github.com/expressjs/morgan/issues/315
- https://github.com/jshttp/on-headers/issues/15