CVE-2026-87859
published medium CVSS 3.1 · 5.3morgan vulnerable to Log Injection via unescaped double quote in quoted log fields
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| morgan | — | morgan0 to < 1.12.1 (affected · semver) · 1.12.1 (unaffected · semver) · Other versions: unaffected | Version-specific | Not stated | openjs |
Description
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 5.3 / 10
- Severity
- medium
- Provider
- openjs · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- Scenarios
- en: GENERAL
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| morgan | morgan | 0 to < 1.12.1 (affected · semver)1.12.1 (unaffected · semver)Default: unaffected | openjs · cna |
Weaknesses
1- CWE-117 CWE-117: Improper Output Neutralization for Logs
References
2Provider assertions
2openjs · cna
morgan vulnerable to Log Injection via unescaped double quote in quoted log fields
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 2a4215c13e2494967c3aaf85f58ffc4d08bfd958999958203e94136e05c8e369
- Ingested
- 23 Sep 2026, 09:37:53 UTC
- Source record
- Official CVE record