HTTP Request Logger Middleware Vulnerability in Morgan by Express.js
CVE-2026-87859

5.3MEDIUM

Key Information:

Vendor

Morgan

Status
Vendor
CVE Published:
11 September 2026

What is CVE-2026-87859?

The Morgan middleware for Node.js, responsible for logging HTTP requests, contains a vulnerability in versions prior to 1.12.1. Specifically, the escapeLogField() function fails to escape the double quote character used in the Apache combined log format. This oversight allows an unauthenticated remote attacker to manipulate quoted fields, such as the User-Agent or Referer headers, resulting in incorrect log entries. By injecting a double quote, an attacker can mislead log consumers by closing a field early, leading to the interpretation of malicious data as legitimate information. The issue has been addressed in Morgan version 1.12.1, which includes the necessary fix to escape the double quote character effectively. Users are advised to update to this version or later to mitigate potential exploitation.

Affected Version(s)

morgan 0 < 1.12.1

morgan 1.12.1

References

CVSS V3.1

Score:
5.3
Severity:
MEDIUM
Confidentiality:
None
Integrity:
Low
Availability:
None
Attack Vector:
Network
Attack Complexity:
Low
Privileges Required:
None
User Interaction:
None
Scope:
Unchanged

Timeline

  • Vulnerability published

  • Vulnerability Reserved

Credit

Alfie Goh Li Heng
UlisesGascon
jonchurch
.