Skip to main content

morgan EUVDEUVD-2026-76027

| CVE-2026-87859 MEDIUM
Improper Output Neutralization for Logs (CWE-117)
2026-09-11 openjs GHSA-9f6g-j8ch-79g4
5.3
CVSS 3.1 · Vendor: openjs
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send HTTP request with double-quote in User-Agent header
  2. Delivery
    morgan calls escapeLogField() which omits double-quote escaping
  3. Exploit
    Unescaped quote terminates the quoted log field prematurely
  4. Execution
    Log line written with shifted field boundaries
  5. Persist
    Downstream log parser reads attacker-supplied text as the next positional field
  6. Impact
    Forged response status or other server-controlled value recorded in audit log

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A09:2025 - Security Logging & Alerting Failures
ASVS 5.0
V16 - Security Logging and Error Handling Log output neutralization
Exploitation Conditions

No authentication is required - any HTTP client that can reach the application can send a crafted request. Morgan must be in use as logging middleware, configured in Apache combined log format (the default built-in 'combined' format qualifies; the simpler 'common' format also includes a quoted User-Agent field). Practical impact on log integrity requires a downstream consumer that parses the log output by positional field splitting per the Apache combined log format specification; applications that store logs as opaque raw text without structural parsing are not meaningfully harmed. Custom log format strings that place an attacker-controlled token (e.g., :user-agent or :referrer) before a server-controlled token within the same quoted group amplify the impact by enabling status-code forgery. Limiting factors: no code execution, no newline injection, no confidentiality or availability impact; exploitation is consequential only when log integrity directly affects security decisions.

Impact

The CVSS 5.3 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N) correctly classifies this as a moderate, integrity-only issue requiring no authentication. The vulnerability is not listed in CISA KEV and no EPSS score was provided in the input, indicating no confirmed active exploitation and an inferred low exploitation probability. The practical impact is constrained to log integrity: SIEM tools, log aggregators, and audit pipelines that parse Apache combined log format by positional field splitting may record incorrect metadata - most consequentially a forged HTTP response status code - for attacker-crafted requests. This is a meaningful risk for security operations centers and compliance workflows relying on morgan-generated logs for forensics or alerting. No code execution, data exfiltration, or service disruption is possible. Notably, the absence of newline injection prevents wholesale log record fabrication, keeping the scope confined to field-position manipulation within a single existing log line. The CVSS vector is internally consistent with the description and no discrepancies require vendor verification.

Exploit ScenarioDerived

An attacker sends an HTTP request with a crafted User-Agent header such as 'Mozilla/5.0" 200 - "spoofed-referer' to any endpoint served by an Express.js application running unpatched morgan. When morgan writes the log line and a downstream SIEM or log parser splits the record by double-quote field positions, it reads the attacker-supplied string segment as the HTTP response status field rather than the actual server-recorded status. No exploit code is publicly available, but the attack requires only a standard HTTP client capable of setting arbitrary request headers.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 11, 2026

Log field injection in morgan, the Node.js HTTP request logger middleware, before version 1.12.1 allows unauthenticated remote attackers to manipulate parsed log records by embedding unescaped double quotes in HTTP headers such as User-Agent or Referer. The escapeLogField() function failed to escape the double-quote character, which serves as a field delimiter in the Apache combined log format that morgan emits by default, enabling a downstream log consumer that parses by field position to read attacker-supplied text as a subsequent field. In custom log formats that quote an attacker-controlled token before a server-controlled one, an attacker can forge field values including the HTTP response status code as seen by SIEMs, audit pipelines, or compliance tooling. No public exploit has been identified at time of analysis.

RemediationAI

Vendor-released patch: morgan 1.12.1. Upgrade by running 'npm install morgan@latest' or pinning to '>=1.12.1' in package.json; the fix adds double-quote escaping to escapeLogField() and is documented at https://github.com/expressjs/morgan/security/advisories/GHSA-9f6g-j8ch-79g4. If an immediate upgrade is not possible, switch the morgan format from the default Apache combined log format to a structured JSON format using a custom token formatter - this eliminates double-quote field delimiters entirely and removes the parser ambiguity without requiring a library upgrade. Alternatively, a middleware layer that strips or encodes double quotes from the User-Agent and Referer headers before they reach morgan will block the injection path, though this alters the logged value from the original. Organizations using morgan output in compliance or forensic pipelines should audit any log parsing rules that split fields positionally until patched deployments are confirmed.

Affected VersionsENISA

morgan 0 <1.12.1

Affected Packages

npm morgan fix: 1.12.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

morgan (CPE: cpe:2.3:a:morgan:morgan:*:*:*:*:*:*:*:*) is a widely-used HTTP request logger middleware for Node.js, commonly paired with Express.js. It writes request and response metadata in Apache combined log format, which uses double-quote characters to delimit fields such as the request line, Referer, and User-Agent. CWE-117 (Improper Output Neutralization for Logs) is the root cause: the internal escapeLogField() function sanitized characters such as newline and backslash but omitted the double-quote character. Because the Apache combined log format specification places field boundaries at double-quote delimiters, any attacker-controlled string written to a quoted field - such as the User-Agent header - can inject an unescaped double quote to close that field early, shifting all subsequent field positions by one. The OpenJS Foundation (CNA) disclosed this via GitHub Security Advisory GHSA-9f6g-j8ch-79g4, and the fix in morgan 1.12.1 adds proper double-quote escaping to escapeLogField().

Know when Morgan gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (openjs) PRIMARY 5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
vuln.today AI 5.3 MEDIUM

Network-accessible with no auth or user interaction required; integrity impact is low (log field manipulation only) with no confidentiality or availability impact.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
SUSE MEDIUM
Red Hat 5.3 MEDIUM

Primary rating from Vendor (openjs).

CVSS VectorVendor: openjs

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None

Lifecycle Timeline

2
Patch available
Sep 11, 2026 - 11:02 EUVD
CVE Published
Sep 11, 2026 - 09:15 cve.org
MEDIUM 5.3

DescriptionCVE.org

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.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 31,171 npm packages depend on morgan (6,953 direct, 24,315 indirect)

Ecosystem-wide dependent count for version 1.12.1.

Threat Intelligence Overview

EPSS Score
0.3%
Top 77% exploitable
Prevalence
High
npm package with tens of millions of weekly downloads in Node.js apps
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Social Media
2
Sightings
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor CIRCL GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise High Performance Computing 12 Not-Affected
SUSE Linux Enterprise Micro 5.3 Affected
SUSE Linux Enterprise Micro 5.3 Affected
SUSE Linux Enterprise Micro 5.4 Affected
SUSE Linux Enterprise Micro 5.4 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy