CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-15603

CVE-2026-15603: Log Forging via Unescaped Unicode Line Separators in morgan Middleware

Amit Schendel
Amit Schendel
Senior Security Researcher

Sep 9, 2026·6 min read·14 visits

Executive Summary (TL;DR)

Unauthenticated remote attackers can inject unescaped Unicode line separators into HTTP headers, forcing Unicode-aware downstream log parsers to split records and forge false logging entries in morgan versions < 1.12.0.

An incomplete fix vulnerability (CVE-2026-15603) in the morgan HTTP request logger middleware for Node.js allows unauthenticated remote attackers to forge log entries. The flaw arises because the escaping mechanism does not neutralize Unicode line separator characters, enabling attackers to inject payloads that trick downstream log processors into splitting single log records into multiple logical entries.

Vulnerability Overview

The standard Express.js HTTP request logging middleware, morgan, relies on internal token serializers to output connection data. When processing incoming client requests, the middleware collects variables such as IP addresses, request paths, headers, and authenticated usernames. If these variables are printed without proper sanitation, raw data can corrupt the log output format.

This vulnerability, tracked as CVE-2026-15603, belongs to the log forging class (CWE-117). It represents an incomplete validation patch for a previous vulnerability, CVE-2026-5078, which resolved ASCII control character injection but overlooked specific Unicode characters. Consequently, unauthenticated remote attackers can inject specific Unicode line breaks to split log entries and construct spoofed system logs.

The attack surface exists on any HTTP endpoint utilizing the morgan middleware where user-controlled values (such as Basic Authentication usernames) are logged. This issue does not require specific authorization to exploit, exposing applications to untrusted remote network payloads.

Root Cause Analysis

The root cause lies in the selective character blacklisting within the internal escaping routine of morgan. While version 1.11.0 successfully sanitized standard C0 control codes, backslashes, and delete characters, it did not recognize non-ASCII Unicode line terminators. Specifically, characters like Next Line (U+0085), Line Separator (U+2028), and Paragraph Separator (U+2029) were left untouched in the raw output stream.

According to RFC 7230 and RFC 9110, the U+0085 character is technically valid within HTTP header fields as obsolete text. Node.js's standard HTTP parser processes and forwards these headers without validation failures, allowing them to reach the logging pipeline. When morgan writes these unescaped bytes, they are appended directly to the output medium.

Modern log ingestion engines, terminal viewers, and SIEM parsers are highly compliant with the Unicode Standard. These tools parse U+0085, U+2028, and U+2029 as physical newline boundaries. When the output stream is read, a single request entry containing these characters is interpreted as multiple distinct logical records.

Code Analysis

To comprehend the vulnerability, analyze the regular expression used in the vulnerable version 1.11.0. The escapeLogField function used a strict regex targeting C0 controls and backslashes:

// Vulnerable implementation in morgan v1.11.0
function escapeLogField (value) {
  if (value == null) return undefined
 
  // eslint-disable-next-line no-control-regex
  return String(value).replace(/[\u0000-\u001f\u007f\\]/g, function (ch) {
    switch (ch) {
      case '\\': return '\\\\'
      case '\b': return '\\b'
      // Other standard C0 ASCII escapes omitted
    }
  })
}

The patch introduced in version 1.12.0 corrected this regex by expanding the range to include C1 control characters (\u007f-\u009f) as well as the explicit separators \u2028 and \u2029. This blocks the injection vector completely:

// Patched implementation in morgan v1.12.0
function escapeLogField (value) {
  if (value == null) return undefined
 
  // eslint-disable-next-line no-control-regex
  return String(value).replace(/[\u0000-\u001f\u007f-\u009f\u2028\u2029\\]/g, function (ch) {
    switch (ch) {
      case '\\': return '\\\\'
      case '\b': return '\\b'
      // Safely escapes Unicode characters preventing log boundaries
    }
  })
}

Furthermore, the maintainers addressed systemic vulnerabilities in the token handling architecture. In previous versions, each logging token was individually responsible for escaping output. The patched version enforces a global wrapping boundary on all registered tokens, ensuring automatic escaping even if third-party components omit sanitization:

// Architectural wrapper added in v1.12.0
function token (name, fn) {
  morgan[name] = function tokenValue () {
    var value = fn.apply(this, arguments)
    return typeof value === 'string' ? escapeLogField(value) : value
  }
  return this
}

Exploitation Methodology

Exploiting this flaw requires an unauthenticated attacker to supply a crafted HTTP request header to a vulnerable server. The attack typically targets fields that are automatically extracted by log tokens, such as the Authorization header decoded by the :remote-user token. By structuring the username field appropriately, an attacker can inject custom records.

An attacker constructs a username containing the Next Line (U+0085) byte sequence, followed by an arbitrary string formatted to look like a standard log. For example, the string might contain a fabricated loopback IP, a successful authentication event, and a mock timestamp. This payload is encoded in Base64 and sent inside the standard Authorization header.

When morgan processes the request, it outputs the unescaped payload directly to stdout. Downstream aggregators, such as Fluentd or Logstash, identify the U+0085 sequence as a newline character. As a result, the aggregator splits the single output line, creating a truncated log for the attacker's actual connection, and a completely separate, forged log representing the injected payload.

No specialized toolsets are required to execute this exploit. Standard command-line clients like curl can transmit the required payload directly to any exposed endpoint on the target system.

Impact Assessment

The primary impact of this vulnerability is the compromise of log integrity. If malicious actors can write arbitrary lines to application logs, they can mask exploitation activities or spoof system behavior. This interferes directly with security auditing and post-incident investigation processes.

This technique aligns with MITRE ATT&CK Defense Evasion tactics, specifically Indicator Removal on Host (T1070). Attackers can obfuscate their presence by splitting logs to make automated warning messages appear associated with benign loopback actions. Additionally, Stored Data Manipulation (T1565.001) can trigger false alerts, causing operational disruptions.

The vulnerability is rated with a CVSS base score of 5.3 (Medium). While the exploit complexity is low and privileges are not required, the direct security boundaries of the target server are not violated. The impact is isolated entirely to the logging ecosystem and downstream ingestion layers.

Remediation & Mitigation

Remediation requires upgrading the morgan dependency to version 1.12.0 or later. This version enforces complete output neutralization for all registered logging tokens. Administrators can execute the upgrade using package managers to update the dependency tree.

npm install morgan@1.12.0

If patching cannot be performed immediately, a temporary mitigation can be implemented using intermediate middleware. A request preprocessing middleware can inspect and sanitize incoming headers before they are processed by the logger. This code must explicitly strip or replace characters in the C1 and Unicode separator ranges:

app.use((req, res, next) => {
  for (const header in req.headers) {
    if (typeof req.headers[header] === 'string') {
      req.headers[header] = req.headers[header].replace(/[\u0080-\u009f\u2028\u2029]/g, '');
    } 
  }
  next();
});

Additionally, firewalls and API gateways can be configured to drop requests containing these characters. Deploying regular expression signatures targeting [\x80-\x9f\u2028\u2029] within HTTP headers effectively mitigates remote exploitation attempts at the perimeter.

Official Patches

ExpressJS ProjectMorgan Release v1.12.0 Changelog and Release
GitHub AdvisoriesOfficial GitHub Security Advisory

Fix Analysis (3)

Technical Appendix

CVSS Score
5.3/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
EPSS Probability
0.24%
Top 86% most exploited

Affected Systems

Node.js applications utilizing morgan logging middleware version < 1.12.0Systems parsing morgan console outputs with Unicode-aware log ingestion agents (Elasticsearch, Fluentd, Logstash)

Affected Versions Detail

Product
Affected Versions
Fixed Version
morgan
OpenJS Foundation
< 1.12.01.12.0
AttributeDetail
CWE IDCWE-117
Attack VectorNetwork (AV:N)
CVSS v3.15.3 (Medium)
EPSS Score0.00235 (14.34th percentile)
ImpactLog Forging & Injection (Integrity Loss)
Exploit StatusProof of Concept (PoC) available
KEV StatusNot listed

MITRE ATT&CK Mapping

T1565.001Stored Data Manipulation
Impact
T1070Indicator Removal on Host
Defense Evasion
CWE-117
Improper Output Neutralization for Logs

The software does not neutralize or incorrectly neutralizes output that is written to logs, allowing an attacker to forge log entries or inject malicious content.

Vulnerability Timeline

Morgan version 1.11.0 is released, addressing standard C0 ASCII log injection (CVE-2026-5078)
2026-06-02
Security fix commit is pushed to the repository main branch
2026-08-28
Morgan version 1.12.0 is officially released on npm
2026-08-28
CVE-2026-15603 and GitHub Security Advisory GHSA-jxfw-x594-9x9m are publicly published
2026-08-28

References & Sources

  • [1]https://www.cve.org/CVERecord?id=CVE-2026-15603
  • [2]https://nvd.nist.gov/vuln/detail/CVE-2026-15603
  • [3]https://cna.openjsf.org/security-advisories.html
  • [4]https://www.wiz.io/vulnerability-database/cve/cve-2026-15603

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•1 minute ago•CVE-2026-109924
5.9

CVE-2026-109924: Unbounded Memory Allocation in Node.js Undici EventSource Stream Parser

A resource allocation vulnerability (CWE-770) exists in the Server-Sent Events (SSE) parser within the Node.js undici HTTP client library. In affected versions, the EventSourceStream implementation fails to restrict the count of internal Buffer chunk references and accumulated string nodes prior to event dispatch boundaries. A malicious or compromised SSE endpoint can exploit this behavior by streaming fragmented, unterminated lines or continuous sequences of short data fields without empty separator lines, bypassing configured byte-size limits and causing a fatal Out-of-Memory (OOM) crash in the client Node.js process.

Amit Schendel
Amit Schendel
0 views•11 min read
•18 minutes ago•CVE-2026-109869
7.5

CVE-2026-109869: Denial of Service via Orphaned Stream in Node.js Undici Fetch Implementation

CVE-2026-109869 is a high-severity denial-of-service vulnerability in undici, the default HTTP/1.1 client and Fetch implementation for Node.js. When a server responds with more than five Content-Encoding directives and prematurely closes the connection before transmitting the body, undici allocates an internal Readable stream before enforcing the content-encoding limit. Upon rejecting the fetch promise, the stream is orphaned without an error listener or abort signal, causing the premature socket closure to emit an unhandled stream error that terminates the Node.js process.

Alon Barad
Alon Barad
2 views•10 min read
•24 minutes ago•CVE-2026-114612
9.9

CVE-2026-114612: Privilege Escalation to Proxy Admin via Cryptographic Context Reuse in LiteLLM

LiteLLM versions 1.87.0 through 1.104.0-rc.1 contain a cryptographic domain separation vulnerability (CWE-269, CWE-345, CWE-441) that allows an authenticated low-privilege user to escalate privileges to full proxy administrator. The application reuses a single symmetric cryptographic context and key derivation path for both at-rest secret encryption and ephemeral UI/CLI session authentication tokens without providing Associated Authenticated Data (AAD). By submitting crafted JSON session claims into user-accessible encrypted metadata fields, an attacker can use the API-key generation flow as an encryption oracle, extract the resulting ciphertext, and replay it as a bearer token to achieve administrative control and subsequent remote command execution via the Model Context Protocol (MCP) stdio interface.

Alon Barad
Alon Barad
5 views•9 min read
•about 1 hour ago•CVE-2026-109461
5.9

CVE-2026-109461: Origin Validation Error in @azure/msal-node Leads to Information Disclosure

An origin validation vulnerability in @azure/msal-node allows attackers to process unchecked authorization code response payloads or request query parameters in ConfidentialClientApplication, potentially directing sensitive client credentials to external endpoints.

Amit Schendel
Amit Schendel
6 views•4 min read
•about 2 hours ago•CVE-2026-113719
4.5

CVE-2026-113719: Arbitrary File Deletion via Path Traversal in virtualenv Seed Package Metadata

A path traversal vulnerability in PyPA virtualenv prior to version 21.14.9 allows local attackers to cause arbitrary file and directory deletion when a virtual environment target directory containing untrusted distribution metadata is reused or reseeded.

Amit Schendel
Amit Schendel
6 views•6 min read
•about 3 hours ago•CVE-2026-113715
2.0

CVE-2026-113715: Configuration Key Injection via Unicode Line Boundary in virtualenv

In virtualenv versions prior to 21.14.9, creating isolated Python virtual environments using the standard library creator (`--creator venv`) allows configuration key injection into `pyvenv.cfg` if an attacker can control or influence the destination directory path containing Unicode line break characters.

Amit Schendel
Amit Schendel
5 views•5 min read