๐Ÿ” CVE Alert

CVE-2026-87859

MEDIUM 5.3

morgan vulnerable to Log Injection via unescaped double quote in quoted log fields

CVSS Score
5.3
EPSS Score
0.0%
EPSS Percentile
0th

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.

CWE CWE-117
Vendor morgan
Product morgan
Published Sep 11, 2026
Last Updated Sep 11, 2026
Stay Ahead of the Next One

Get instant alerts for morgan morgan

Be the first to know when new medium vulnerabilities affecting morgan morgan are published โ€” delivered to Slack, Telegram or Discord.

Get Free Alerts โ†’ Free ยท No credit card ยท 60 sec setup

CVSS v3 Breakdown

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability

Affected Versions

morgan / morgan
0 < 1.12.1

References

NVD โ†— CVE.org โ†— EPSS Data โ†—
github.com: https://github.com/expressjs/morgan/security/advisories/GHSA-9f6g-j8ch-79g4 cna.openjsf.org: https://cna.openjsf.org/security-advisories.html

Credits

Alfie Goh Li Heng UlisesGascon jonchurch