CVE-2026-87859
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.
Scoring
- Severity
- MEDIUM
- CVSS base score
- 5.3
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- CWE
- CWE-117
- Published
- 2026-09-11
- Last modified
- 2026-09-11
Affected products
- morgan morgan
- morgan morgan
Weakness type
Related vulnerabilities
- CVE-2026-14350 — Vulnerabilities exists in IBM Cloud Pak for Data System
- CVE-2026-9736 — Vulnerabilities exists in IBM Netezza Software
- CVE-2026-15603 — morgan vulnerable to Log Forging via unescaped Unicode line separators
- CVE-2026-81696 — openssl_encrypt before 1.4.9 Terminal Injection via info Command
- CVE-2026-81695 — openssl_encrypt before 1.4.9 Terminal Injection via key_id
- CVE-2026-81694 — verify-usb before 1.4.9 Output Injection via Unsanitized Filenames
- CVE-2026-54511 — @logtape/syslog: syslog log injection via unescaped control characters and unvalidated SD-NAME keys
- CVE-2026-44256 — Wazuh: CRLF Log Injection via Unsanitized Basic-Auth Username