CVEfocus › CVE database › CVE-2026-87859

CVE-2026-87859morgan vulnerable to Log Injection via unescaped double quote in quoted log fields

CVSS 5.3 MediumEPSS 0.4% (higher than 27% of CVEs)Published 2026-09-11Updated 2026-09-11Assigner: openjs

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-117

What to do

Fixed builds are available from Debian, npm: see the table below for the fixed version per release.

Debian, Red Hat, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

2Fixed
43Fix pending
3Under investigation

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10node-morganFix pendingUBUNTU-CVE-2026-87859
Ubuntu 26.04node-morganUnder investigationUBUNTU-CVE-2026-87859
Ubuntu 24.04node-morganUnder investigationUBUNTU-CVE-2026-87859
Ubuntu 22.04node-morganUnder investigationUBUNTU-CVE-2026-87859
Debian 14node-morganFixed1.12.1+~1.9.10-1DEBIAN-CVE-2026-87859
Debian 13node-morganFix pendingDEBIAN-CVE-2026-87859
Debian 12node-morganFix pendingDEBIAN-CVE-2026-87859
Red Hat Enterprise Linux 10linux-sgxFix pending
Fix deferred
Red Hat Enterprise Linux 10nodejsFix pending
Fix deferred
Red Hat Enterprise Linux 10nodejs-develFix pending
Fix deferred
Red Hat Enterprise Linux 10nodejs-docsFix pending
Fix deferred
Red Hat Enterprise Linux 10nodejs-full-i18nFix pending
Fix deferred
Red Hat Enterprise Linux 10nodejs-libsFix pending
Fix deferred
Red Hat Enterprise Linux 10nodejs-npmFix pending
Fix deferred
Red Hat Enterprise Linux 10nodejs22Fix pending
Fix deferred
Red Hat Enterprise Linux 10nodejs24Fix pending
Fix deferred
Red Hat Enterprise Linux 10nodejs24-develFix pending
Fix deferred
Red Hat Enterprise Linux 10nodejs24-docsFix pending
Fix deferred
Red Hat Enterprise Linux 10nodejs24-full-i18nFix pending
Fix deferred
Red Hat Enterprise Linux 10nodejs24-libsFix pending
Fix deferred
Red Hat Enterprise Linux 10nodejs24-npmFix pending
Fix deferred
Red Hat Enterprise Linux 10nodejs26Fix pending
Fix deferred
Red Hat Enterprise Linux 10nodejs26-develFix pending
Fix deferred
Red Hat Enterprise Linux 10nodejs26-docsFix pending
Fix deferred
Red Hat Enterprise Linux 10nodejs26-full-i18nFix pending
Fix deferred
Red Hat Enterprise Linux 10nodejs26-libsFix pending
Fix deferred
Red Hat Enterprise Linux 10nodejs26-npmFix pending
Fix deferred
Red Hat Enterprise Linux 10sgx-commonFix pending
Fix deferred
Red Hat Enterprise Linux 10sgx-libsFix pending
Fix deferred
Red Hat Enterprise Linux 10sgx-mpaFix pending
Fix deferred
Red Hat Enterprise Linux 10sgx-pccsFix pending
Fix deferred
Red Hat Enterprise Linux 10sgx-pccs-adminFix pending
Fix deferred
Red Hat Enterprise Linux 10sgx-pckid-toolFix pending
Fix deferred
Red Hat Enterprise Linux 10tdx-qgsFix pending
Fix deferred
Red Hat Enterprise Linux 9linux-sgxFix pending
Fix deferred
Red Hat Enterprise Linux 9nodejsFix pending
Fix deferred
Red Hat Enterprise Linux 9nodejs-docsFix pending
Fix deferred
Red Hat Enterprise Linux 9nodejs-full-i18nFix pending
Fix deferred
Red Hat Enterprise Linux 9nodejs-libsFix pending
Fix deferred
Red Hat Enterprise Linux 9npmFix pending
Fix deferred
Red Hat Enterprise Linux 9sgx-commonFix pending
Fix deferred
Red Hat Enterprise Linux 9sgx-libsFix pending
Fix deferred
Red Hat Enterprise Linux 9sgx-mpaFix pending
Fix deferred
Red Hat Enterprise Linux 9sgx-pccsFix pending
Fix deferred
Red Hat Enterprise Linux 9sgx-pccs-adminFix pending
Fix deferred
Red Hat Enterprise Linux 9sgx-pckid-toolFix pending
Fix deferred
Red Hat Enterprise Linux 9tdx-qgsFix pending
Fix deferred
npm librarymorganFixed1.12.1GHSA-9f6g-j8ch-79g4

What the vendor says

As published in the CVE record by openjs, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.