GHSA-4vj7-5mj6-jm8m: morgan vulnerable to Log Forging via unneutralized control characters in :remote-user
Morgan versions from 1.2.0 up to but not including 1.11.0 are vulnerable to log forging via unneutralized control characters in the :remote-user token. This token extracts the Basic auth username from the Authorization header and logs it without sanitizing control characters, allowing attackers to inject forged log lines. The vulnerability affects built-in log formats that include :remote-user, such as combined, common, default, and short, as well as any custom formats using this token. A fix is available in version 1.11.0. As a workaround, users can avoid including :remote-user in log format strings.
AI Analysis
Technical Summary
Morgan's :remote-user token does not neutralize control characters extracted from the Basic auth username in the Authorization header before writing to logs. This allows an attacker to craft Authorization headers containing CR/LF characters to inject forged log lines, corrupting the log structure. The vulnerability affects all built-in formats that use :remote-user and any custom formats including it. The issue is tracked as CVE-2026-5078 and CWE-117 (Improper Output Neutralization for Logs). Users should upgrade to Morgan version 1.11.0 to remediate this vulnerability.
Potential Impact
An attacker can manipulate the Authorization header to include control characters that break the log line structure, enabling log forging. This compromises the integrity of access logs, potentially misleading log analysis and forensic investigations. There is no direct confidentiality or availability impact reported.
Mitigation Recommendations
Upgrade Morgan to version 1.11.0, which contains the official fix for this vulnerability. As a temporary workaround, configure Morgan to use a custom log format that excludes the :remote-user token to avoid logging unneutralized control characters.
GHSA-4vj7-5mj6-jm8m: morgan vulnerable to Log Forging via unneutralized control characters in :remote-user
Description
Morgan versions from 1.2.0 up to but not including 1.11.0 are vulnerable to log forging via unneutralized control characters in the :remote-user token. This token extracts the Basic auth username from the Authorization header and logs it without sanitizing control characters, allowing attackers to inject forged log lines. The vulnerability affects built-in log formats that include :remote-user, such as combined, common, default, and short, as well as any custom formats using this token. A fix is available in version 1.11.0. As a workaround, users can avoid including :remote-user in log format strings.
CVSS v3.1
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Morgan's :remote-user token does not neutralize control characters extracted from the Basic auth username in the Authorization header before writing to logs. This allows an attacker to craft Authorization headers containing CR/LF characters to inject forged log lines, corrupting the log structure. The vulnerability affects all built-in formats that use :remote-user and any custom formats including it. The issue is tracked as CVE-2026-5078 and CWE-117 (Improper Output Neutralization for Logs). Users should upgrade to Morgan version 1.11.0 to remediate this vulnerability.
Potential Impact
An attacker can manipulate the Authorization header to include control characters that break the log line structure, enabling log forging. This compromises the integrity of access logs, potentially misleading log analysis and forensic investigations. There is no direct confidentiality or availability impact reported.
Mitigation Recommendations
Upgrade Morgan to version 1.11.0, which contains the official fix for this vulnerability. As a temporary workaround, configure Morgan to use a custom log format that excludes the :remote-user token to avoid logging unneutralized control characters.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-4vj7-5mj6-jm8m
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-5078"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6a520ef168715ace4391db19
Added to database: 07/11/2026, 09:37:53 UTC
Last enriched: 07/11/2026, 10:11:32 UTC
Last updated: 07/11/2026, 20:44:32 UTC
Views: 6
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.