cve.bz

CVE-2026-87859 morgan morgan: Improper Output Neutralization for Logs

5.3 mediumEPSS 0.4%Fix available

Medium (5.3) in morgan morgan. EPSS 0.4% estimated probability of exploitation activity in the next 30 days. Fixed in morgan 1.12.1.

On this page
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.

Severity

CVSS 3.1

5.3 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
EPSS
0.4% (unchanged from 0.4% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 36th percentile. Scored 2026-11-24. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: partial, assessed 2026-09-11. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-117 Improper Output Neutralization for Logs
OWASP Top 10
A09:2025 Logging & Alerting Failures
Published
Modified
NVD analysis
Awaiting analysis
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-87859 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-87859?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-87859?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-87859 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
morganbefore 1.12.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-9f6g-j8ch-79g4npmmorgan<1.12.11.12.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13node-morganno fix listedDEBIAN-CVE-2026-87859
Debian14node-morgan1.12.1+~1.9.10-1DEBIAN-CVE-2026-87859
Ubuntu22.04:LTS, 24.04:LTS, 26.04:LTS and 1 morenode-morganno fix listedUBUNTU-CVE-2026-87859

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

A log injection flaw in the `morgan` Node.js middleware allows an unauthenticated remote attacker to manipulate log entries. By injecting unescaped double quotes into HTTP headers, an attacker can cause log parsing tools to misinterpret subsequent log data, potentially forging log entries such as response status. This primarily impacts log integrity rather than enabling arbitrary code execution or system compromise.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

ProductPackageStateAdvisory
Cryostat 4cryostat/cryostat-openshift-console-plugin-rhel9Fix deferred
Red Hat Enterprise Linux 10linux-sgxFix deferred
Red Hat Enterprise Linux 10nodejs22Fix deferred
Red Hat Enterprise Linux 10nodejs24Fix deferred
Red Hat Enterprise Linux 10nodejs26Fix deferred
Red Hat Enterprise Linux 9linux-sgxFix deferred
Red Hat Enterprise Linux 9nodejs:22/nodejsFix deferred
Red Hat Fuse 7morganOut of support scope
Red Hat Hardened Imagesnodejs20Will not fix
Red Hat Hardened Imagesnodejs22Not affected
Red Hat Hardened Imagesnodejs24Not affected
Red Hat Hardened Imagesnodejs25Will not fix
Red Hat Hardened Imagesnodejs26Not affected
Red Hat Openshift Data Foundation 4odf4/mcg-core-rhel9Fix deferred

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-87859.

Attack patterns (CAPEC)

  • CAPEC-81 Web Server Logs Tampering Likelihood: Medium · Severity: High
  • CAPEC-93 Log Injection-Tampering-Forging Likelihood: High · Severity: High
  • CAPEC-268 Audit Log Manipulation

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON