Skip to content
OpenAdvisories
Medium · 5.3 CVE-2026-5078 EUVD-2026-34067GHSA-4vj7-5mj6-jm8m

morgan vulnerable to Log Forging via unneutralized control characters in :remote-user

Published Jun 3, 2026 · Updated Jun 3, 2026 · Assigned by openjs

Description

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.

Affected products

VendorProductAffectedFixed
morgan morgan 1.2.0 – ≤ 1.10.1 1.11.0

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 node-morgan 1.12.0+~1.9.10-1 —
Debian 13 node-morgan No fix yet —
Debian 12 node-morgan No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 node-morgan No fix yet —
Ubuntu 26.04 LTS node-morgan No fix yet —
Ubuntu 25.10 node-morgan No fix yet —
Ubuntu 24.04 LTS node-morgan No fix yet —
Ubuntu 22.04 LTS node-morgan No fix yet —
ReleasePackageFixed inAdvisory
Red Hat Hardened Images 1 nodejs24 +6 24.18.0-0.3.hum1 RHSA-2026:38236
Red Hat Hardened Images 1 nodejs24-npm 11.16.0-1.24.18.0.0.3.hum1 RHSA-2026:38236
Red Hat Hardened Images 1 v8-13.6-devel 13.6.233.17-1.24.18.0.0.3.hum1 RHSA-2026:38236

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling tileserver-gl 5.6.0-r10 —

Affected packages

EcosystemPackageAffectedFixedRecord
npm morgan >= 1.2.0, < 1.11.0 1.11.0 GHSA-4vj7-5mj6-jm8m

Advisories 1

References