nday
CVE-2026-87859

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

morgan / morgan

Disclosed . nday has no fix record for it yet; that does not mean no patch exists. None of the four PoC sources lists it. Not in CISA KEV.

why these tags

nday derives these tags by fixed rules from the facts below; NVD, the CNA and other sources do not assign them. Vocabulary and rules: ~/tags.

CRLF injection
CWE-117, stated by the CNA openjs and NVD, republishing ce714d77-add3-4f53-aff5-83d477b104bb
remote, unauthenticated
AV:N, PR:N, UI:N in CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N (CVSS 3.1) from the CNA openjs
network
AV:N in CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N (CVSS 3.1) from the CNA openjs
no authentication required
PR:N in CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N (CVSS 3.1) from the CNA openjs
no user interaction
UI:N in CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N (CVSS 3.1) from the CNA openjs
stage
DIS
disclosed
cvss
5.3 MEDIUM v3.1

Lifecycle

x axis UTC; dot = exact minute, wide bar = date only, hollow = unknown or inferred.
time unknown
DISdisclosed
09-11T09:15Z
PATpatch
no record yet
ANAanalysis
no record yet
POCPoC
no record yet
ITWexploited
no record yet
KEVKEV
no record yet

Summary

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.

Original text of the CVE record (cvelist), shown as published.

Exploit conditions

What an attack needs, read from the CVSS vector.
Attack vector AV:N
Network: the attacker only needs to reach it over the network
Attack complexity AC:L
Low: no special conditions; the attacker can expect repeatable success
Privileges required PR:N
None: no account or authorization needed
User interaction UI:N
None: no action by anyone other than the attacker

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

CVSS 3.1 vector from the CVE record, scored by the CNA openjs.

Event log

+DISdisclosed

CVE record published by openjs. CVSS 5.3, medium.

src cvelist · nday , bulk import · raw
{
  "id": 451440,
  "type": "disclosed",
  "source": "cvelist",
  "url": "https://www.cve.org/CVERecord?id=CVE-2026-87859",
  "occurred_at": "2026-09-11T09:15:19.109Z",
  "observed_at": "2026-11-13T05:40:14.931471Z",
  "is_backfill": true,
  "dedupe_key": "",
  "detail": {
    "cvss": {
      "source": "cna",
      "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N",
      "version": "3.1",
      "base_score": 5.3,
      "base_severity": "MEDIUM"
    },
    "ssvc": {
      "timestamp": "2026-09-11T11:22:20.073554Z",
      "automatable": "yes",
      "exploitation": "none",
      "technical_impact": "partial"
    },
    "state": "PUBLISHED",
    "date_published": "2026-09-11T09:15:19.109Z",
    "assigner_short_name": "openjs"
  }
}

Report an error

report an error or omission

Something on this page wrong or missing? Tell the editors; if they accept it, this page's revision log says so publicly. Upstream data is not changed.

Researcher discussion

0 researchers mentioned this in the last 7 days

Posts on X by researchers on nday's list that mention this CVE, shown as posted. nday does not check them.

nday has not collected any post on X by listed researchers that mentions this CVE.

Discussion

0 comments

No comments yet.