Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSend HTTP request with CR/LF-embedded Basic Auth username
-
DeliveryMorgan extracts :remote-user token without sanitization
-
ExploitControl characters break log line boundary
-
ExecutionInjected lines written to log stream as legitimate entries
-
ImpactForged audit trail conceals attacker activity or spoofs events
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 | The application must be running morgan in version range 1.2.0-1.10.1 with a format that references the :remote-user token - this includes the built-in combined, common, default, and short formats, as well as any user-defined custom format string containing :remote-user. No authentication is required; any HTTP client that can reach the application's listening port can supply an arbitrary Authorization header. No special server-side configuration is needed beyond morgan being active with an affected format. Exploitation is limited by the following: the attacker must know or guess that the endpoint is morgan-instrumented (trivial to determine via response headers or open-source intelligence on Express.js stacks), the impact is strictly confined to log integrity with no path to code execution or data exfiltration, and applications already running morgan 1.11.0 or using a :remote-user-free format string are fully unaffected. |
| Impact | The CVSS 3.1 score of 5.3 (Medium) with vector AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N accurately captures that this is trivially reachable from the network with no authentication or user interaction, but produces only limited integrity impact - no confidentiality or availability loss. No EPSS score was provided in the input data, so exploitation probability cannot be quantified. The CVE is not listed in CISA KEV and no POC code is identified, placing this in a genuine medium-priority category rather than an emergency. The real-world risk is disproportionately higher for organizations that rely on morgan access logs as a security control: an attacker can use log forgery to mask their true request patterns, spoof benign-looking entries, or overwhelm log parsers. Because any unauthenticated HTTP request carrying a crafted Authorization header is sufficient for exploitation, automated scanning or opportunistic exploitation is feasible at low cost. However, the concrete impact is constrained to log integrity and does not lead to direct data access, code execution, or service disruption. Priority should be elevated for deployments where access logs feed SIEM alerting or compliance audit trails. |
| Exploit ScenarioDerived | An unauthenticated attacker sends an HTTP GET request to any endpoint of a morgan-instrumented Express.js application with an Authorization header of the form |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 03, 2026
Log injection in morgan Node.js middleware versions 1.2.0 through 1.10.1 allows unauthenticated remote attackers to forge access log entries by embedding CR or LF control characters in the Basic authentication username of the Authorization request header. The :remote-user format token writes this value to the log stream without sanitization, breaking the one-request-per-line log structure and enabling attackers to fabricate arbitrary log lines visible to downstream consumers such as SIEMs or log aggregators. No active exploitation is confirmed (not in CISA KEV) and no public exploit code is identified at time of analysis, but the zero-prerequisite network attack vector and widespread use of morgan across the Node.js/Express ecosystem make this a meaningful integrity risk for security monitoring pipelines.
RemediationAI
Upgrade morgan to version 1.11.0, the vendor-released patch that neutralizes control characters in :remote-user token output before writing to the log stream. This is documented in the OpenJS Foundation advisory at https://github.com/expressjs/morgan/security/advisories/GHSA-4vj7-5mj6-jm8m and the CNA page at https://cna.openjsf.org/security-advisories.html. If an immediate upgrade is not possible, switch to a custom morgan format string that omits the :remote-user token entirely - the trade-off is loss of authenticated username capture in access logs, which may reduce visibility for authentication auditing and forensics. An additional compensating control is to configure a reverse proxy or WAF to reject or strip Authorization headers containing raw CR or LF bytes before they reach the Node.js process; this blocks the injection vector at the perimeter but requires careful regex or byte-inspection rules to avoid breaking legitimate Basic auth flows. The upgrade path has no known side effects.
Affected VersionsENISA
Affected Packages
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 is a widely deployed HTTP request logging middleware for Node.js, commonly used with Express.js. It supports configurable format strings composed of tokens - :remote-user being one that extracts the username component from a parsed Basic Authentication Authorization header. The root cause is CWE-117 (Improper Output Neutralization for Logs): user-controlled input is written to the log stream without stripping or escaping newline characters (CR \r, LF \n), which are structural delimiters in line-oriented log formats. This allows a single HTTP request to produce multiple log lines, with the injected lines appearing indistinguishable from legitimate access log entries. All four built-in morgan format strings - combined, common, default, and short - reference :remote-user and are therefore affected. Any user-defined custom format that includes :remote-user is equally vulnerable. The affected CPE is cpe:2.3:a:morgan:morgan:*:*:*:*:*:*:*:*, with the authoritative version range of 1.2.0-1.10.1 established by the OpenJS Foundation advisory.
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
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Primary rating from Vendor (openjs).
CVSS VectorVendor: openjs
DescriptionCVE.org
Impact: The morgan logging middleware's :remote-user token extracts the Basic auth username from the Authorization request header and writes it to the log stream without neutralizing control characters. An unauthenticated attacker can send a crafted Authorization Basic header containing CR or LF bytes to inject forged log lines, breaking the one-request-per-line structure of access logs and enabling log forgery against downstream log consumers. The built-in combined, common, default, and short formats are affected, as well as any custom format that references :remote-user. Affected versions: morgan 1.2.0 through 1.10.1. Patches: upgrade to morgan 1.11.0, which neutralizes control characters in the :remote-user token output. Workarounds: use a custom format string that does not include :remote-user.
Blast Radius
ecosystem impact- 241 npm packages depend on morgan (3 direct, 238 indirect)
Ecosystem-wide dependent count for version 1.2.0.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
An attacker can use the format parameter to inject arbitrary commands in the npm package morgan < 1.9.1. Rated critical
Log field injection in morgan, the Node.js HTTP request logger middleware, before version 1.12.1 allows unauthenticated
Log forging in morgan HTTP request logger middleware for Node.js (all versions prior to 1.12.0) allows unauthenticated r
EUVD-2026-34067
GHSA-4vj7-5mj6-jm8m
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB