CVE-2026-87859 json
morgan vulnerable to Log Injection via unescaped double quote in quoted log fields
published 2mo ago modified last mo. also EUVD-2026-76027 , GHSA-9f6g-j8ch-79g4
- cvss
- 5.3
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 35%
- public exploits
- 0
- none known
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.
Patch / fix
- npm morgan 1.12.1
- morgan morgan 1.12.1
- node-morgan Debian 14 1.12.1+~1.9.10-1
debian advisories DEBIAN-CVE-2026-87859
Is CVE-2026-87859 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-87859 updated cvss 5.3
morgan: morgan: Log Injection via unescaped double quote in log fields
-
Red Hat Cryostat 4 cryostat/cryostat-openshift-console-plugin-rhel9 Red Hat Enterprise Linux 9 npm, nodejs, sgx-mpa, tdx-qgs, sgx-libs, sgx-pccs, +6 more Red Hat Enterprise Linux 10 linux-sgx 2.26-7.el10, nodejs26 26.1.0-1.el10, nodejs22 22.23.2-1.el10_0, nodejs24 24.19.0-1.el10_2affected: workaround, no fix available “Fix deferred”
-
Red Hat Fuse 7 morgan 1.6.1affected: workaround, no fix planned “Out of support scope”
-
Red Hat Hardened Images nodejs25 25.9.0-1.6.hum1, nodejs20 20.20.2-1.2.hum1affected: workaround, no fix planned “Will not fix”
-
Red Hat Openshift Data Foundation 4 odf4/mcg-core-rhel9affected: workaround, no fix available “Fix deferred”
-
Red Hat Hardened Images nodejs26 26.1.0-1.el10, nodejs22 22.23.2-1.el10_0, nodejs24 24.19.0-1.el10_2not affected: component not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 2mo ago
Exploit prediction
0.41% chance of exploitation in the next 30 days, higher than 35% of all scored CVEs (FIRST EPSS, 2026-11-11).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
| GitHub | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | morgan | <1.12.1 |
1.12.1 |
Affected products
- morgan morgan
Classification
- Weakness
-
- CWE-117 Improper Output Neutralization for Logs
References
-
github.com
/expressjs/morgan/commit/4b695edf967ce179cdf4009fe8cddd184b7511ee
web
-
github.com
/expressjs/morgan/security/advisories/GHSA-9f6g-j8ch-79g4
web, advisory
-
cna.openjsf.org
/security-advisories.html
web
-
nvd.nist.gov
/vuln/detail/CVE-2026-87859
advisory
-
github.com
/expressjs/morgan
package
-
github.com
/expressjs/morgan/releases/tag/1.12.1
web
Sources
- CVE List CVE-2026-87859
- GitHub Advisory GHSA-9f6g-j8ch-79g4
- NVD CVE-2026-87859
- Maintainer advisory GHSA-9f6g-j8ch-79g4
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
The maintainers of expressjs/morgan published their own advisory on GitHub. Reviewed sources take precedence over it.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.