CVE-2026-87859

Source
https://cve.org/CVERecord?id=CVE-2026-87859
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-87859.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-87859
Aliases
  • GHSA-9f6g-j8ch-79g4
Downstream
Published
2026-09-11T09:15:19Z
Modified
2026-09-18T03:30:22Z
Severity
  • 5.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N CVSS Calculator
Summary
morgan vulnerable to Log Injection via unescaped double quote in quoted log fields
Details

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.

Database specific
{
    "cna_assigner": "openjs",
    "cwe_ids": [
        "CWE-117"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/87xxx/CVE-2026-87859.json"
}
References

Affected packages

Git / github.com/expressjs/morgan

Affected ranges

Type
GIT
Repo
https://github.com/expressjs/morgan
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Database specific
Show details
{
    "extracted_events": [
        {
            "introduced": "0"
        },
        {
            "fixed": "1.12.1"
        }
    ],
    "source": [
        "AFFECTED_FIELD",
        "DESCRIPTION"
    ]
}

Affected versions

1.*
1.0.0
1.0.1
1.1.0
1.1.1
1.10.0
1.11.0
1.12.0
1.2.0
1.2.1
1.2.2
1.2.3
1.3.0
1.3.1
1.3.2
1.4.0
1.4.1
1.5.0
1.5.1
1.5.2
1.5.3
1.6.0
1.6.1
1.7.0
1.8.0
1.8.1
1.8.2
1.9.0
1.9.1

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-87859.json"