5.3Medium

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.

What this means for your business

  • An attacker can use it remotely, over a network, without a login, and without anyone at your company clicking anything.

What to do

  1. 1Ask your IT team or provider whether any of your systems use the affected product.
  2. 2If you do, follow the vendor's guidance. No patch reference has been published yet.

Not sure if your company is exposed?

Fastnexa’s certified penetration testers can check whether attackers could use this flaw, or others like it, against your websites, apps and network. The full test is free for our first 10 founding clients until 31 December 2026.

Scoring

CVSS
5.3 (v3.1)
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Weakness
CWE-117
Assigned by
ce714d77-add3-4f53-aff5-83d477b104bb

Dates

Published
2026-09-11
Last modified
2026-09-16
Sources
NVD

References