Skip to content

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

MediumCVSS 5.3 EPSS 0.33%
Published
Updated
Exploit status
No public exploit known

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

ProductAffected versionsFixed in
npm morgan >= 1.2.0, <= 1.10.1 No fix listed
redhat/nodejs24-main(Red Hat:hummingbird:1) < 11.16.0-1.24.18.0.0.3.hum1 11.16.0-1.24.18.0.0.3.hum1
redhat/nodejs24-main(Red Hat:hummingbird:1) < 24.18.0-0.3.hum1 24.18.0-0.3.hum1
redhat/openshift-sandboxed-containers/osc-pccs(Red Hat:confidential_compute_attestation:1) All versions No fix listed
redhat/cryostat/cryostat-openshift-console-plugin-rhel9(Red Hat:cryostat:4) All versions No fix listed
redhat/rhdh/rhdh-hub-rhel9(Red Hat:rhdh:1) All versions No fix listed
redhat/linux-sgx(Red Hat:enterprise_linux:10) All versions No fix listed
redhat/linux-sgx(Red Hat:enterprise_linux:9) All versions No fix listed
redhat/morgan(Red Hat:jboss_fuse:7) All versions No fix listed
redhat/nodejs20(Red Hat:hummingbird:1) All versions No fix listed
redhat/nodejs25(Red Hat:hummingbird:1) All versions No fix listed
redhat/odf4/mcg-core-rhel9(Red Hat:openshift_data_foundation:4) All versions No fix listed
redhat/rhceph-dev/odf4-mcg-core-rhel9(Red Hat:openshift_data_foundation:4) All versions No fix listed
redhat/ansible-automation-platform/automation-portal(Red Hat:ansible_portal:2) All versions No fix listed
npm morgan(npm) >= 1.2.0, <= 1.10.1 No fix listed
debian/node-morgan(Debian:12) All versions No fix listed
debian/node-morgan(Debian:12) = 1.10.0+~1.9.3-1 No fix listed
debian/node-morgan(Debian:12) = 1.10.1+~1.9.10-1 No fix listed
debian/node-morgan(Debian:12) = 1.12.0+~1.9.10-1 No fix listed
debian/node-morgan(Debian:12) = 1.12.1+~1.9.10-1 No fix listed
debian/node-morgan(Debian:13) All versions No fix listed
debian/node-morgan(Debian:13) = 1.10.0+~1.9.3-1 No fix listed
debian/node-morgan(Debian:13) = 1.10.1+~1.9.10-1 No fix listed
debian/node-morgan(Debian:13) = 1.12.0+~1.9.10-1 No fix listed
debian/node-morgan(Debian:13) = 1.12.1+~1.9.10-1 No fix listed
Show 9 more
ProductAffected versionsFixed in
debian/node-morgan(Debian:14) < 1.12.0+~1.9.10-1 1.12.0+~1.9.10-1
debian/node-morgan(Debian:14) = 1.10.0+~1.9.3-1 No fix listed
debian/node-morgan(Debian:14) = 1.10.1+~1.9.10-1 No fix listed
ubuntu/node-morgan(Ubuntu:22.04) All versions No fix listed
ubuntu/node-morgan(Ubuntu:24.04) All versions No fix listed
ubuntu/node-morgan(Ubuntu:26.04) All versions No fix listed
ubuntu/node-morgan(Ubuntu:26.10) All versions No fix listed
morgan project morgan >= 1.2.0, < 1.11.0 1.11.0
npm morgan(npm) >= 1.2.0, < 1.11.0 1.11.0

References