Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. morgan
  4. ›
  5. CVE-2026-5078

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

July 10, 2026

Morgan’s :remote-user token extracts the Basic auth username from the Authorization header and writes it to the log stream without neutralizing control characters. An attacker can send a crafted Authorization: Basic header containing CR/LF characters to inject forged log lines, corrupting the one-request-per-line structure of access logs.

The built-in combined, common, default, and short formats are affected, as well as any custom format that includes :remote-user.

References

  • cna.openjsf.org/security-advisories.html
  • github.com/advisories/GHSA-4vj7-5mj6-jm8m
  • github.com/expressjs/morgan/security/advisories/GHSA-4vj7-5mj6-jm8m
  • nvd.nist.gov/vuln/detail/CVE-2026-5078

Code Behaviors & Features

Detect and mitigate CVE-2026-5078 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 1.2.0 before 1.11.0

Fixed versions

  • 1.11.0

Solution

Upgrade to version 1.11.0 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-117: Improper Output Neutralization for Logs

Source file

npm/morgan/CVE-2026-5078.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:18:18 +0000.