morgan vulnerable to Log Injection via unescaped double quote in quoted log fields
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · Low · None
- Fix status
- Partial Red Hat: 6 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat.
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| morgan | morgan | before 1.12.1 | 1.12.1 | Patch available | CNA |
| — | morgan (npm) | before 1.12.1 | 1.12.1 | Patch available | GHSA-9f6g-j8ch-79g4 |
- morgan Vendormorgan Affected before 1.12.1 Fixed in 1.12.1 Patch available CNA
- morgan (npm) Vendor— Affected before 1.12.1 Fixed in 1.12.1 Patch available GHSA-9f6g-j8ch-79g4
Remediation
- Fix · CNA morgan (morgan) Fixed in 1.12.1
- Fix · GHSA-9f6g-j8ch-79g4 morgan (npm) Fixed in 1.12.1 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Cryostat 4 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 10 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 9 | Affected | No fix yet: Fix deferred |
| Red Hat Fuse 7 | Affected | No fix planned: Out of support scope |
| Red Hat Hardened Images | Affected | No fix planned: Will not fix |
| Red Hat Openshift Data Foundation 4 | Affected | No fix yet: Fix deferred |
Not affected: 1 product
- Red Hat Hardened Images
Timeline
- 2026-10-02 Threatist record created from CVE-2026-87859
- 2026-10-03 Alias added: GHSA-9f6g-j8ch-79g4
References
Other 5
Sources
- CVE-2026-87859 · CVE Program
- CVE-2026-87859 · NVD
- FIRST EPSS
- GHSA-9f6g-j8ch-79g4 · GitHub Advisory Database · CC BY 4.0
- CVE-2026-87859 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences