CVE-2026-87859: morgan vulnerable to Log Injection via unescaped double quote in quoted log fields
Vulnerability summary
CVE-2026-87859 is a medium (CVSS 5.3) Improper Output Neutralization for Logs vulnerability in morgan. EPSS estimates a 0.41% chance of exploitation in the next 30 days, higher than 35.3% of scored vulnerabilities.
Not severe (CVSS 5.3, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Timeline
- 11-09-2026PublishedVulnerability first disclosed.
- 11-09-2026Last modifiedVulnerability information updated.
Description
morgan is an HTTP request logger middleware for Node.js. In versions before 1.12.1, its escapeLogField() function does not escape the double quote character, which delimits the quoted fields of the Apache combined log format that morgan emits. An unauthenticated remote attacker who controls a value written to a quoted field, such as the User-Agent or Referer header, can include a double quote to close that field early, so a log consumer that parses the log by field position reads attacker-supplied text as the following field. In the built-in formats this makes the recorded value differ from the value that was sent, and in custom formats that quote an attacker-controlled token before a server-controlled one it can forge values such as the response status. No newline is injected, so record separation stays intact. The issue is fixed in morgan 1.12.1, which escapes the double quote. Users should upgrade to morgan 1.12.1 or later.
CVSS metrics
7 scores · 7 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- OSV · DebianEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- OSV · WolfiEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- OSV · NpmEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- OSV · ChainguardEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- NVDNIST5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
EPSS trend
Probability
0.41%
Chance of exploitation in the next 30 days
Percentile
35%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.41% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Chainguard7 products
- azurite< 3.37.0-r1
- http-https-echo< 42-r2
- http-https-echo-fips< 42-r2
- json-server< 0.17.4-r14
- tileserver-gl< 5.6.0-r17
Wolfi2 products
- json-server< 0.17.4-r14
- tileserver-gl< 5.6.0-r17
Debian1 product
- node-morganAll versions (No fix recorded) | < 1.12.1+~1.9.10-1
Morgan1 product
- morgan< 1.12.1
Npm1 product
- morgan< 1.12.1
Ubuntu1 product
- node-morganAll versions (No fix recorded)
6 vendors · 13 products
References
10 links- github.com/expressjs/morganPACKAGE