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

- Severity: Medium 5.3 (CVSS:3.1, scored by openjs) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.41%, higher than 27% of CVEs (2026-11-30)
- Published: 2026-06-03T05:56:49.512Z
- Modified: 2026-09-10T03:51:10.338Z
- Also known as: GHSA-4vj7-5mj6-jm8m
- Weaknesses: CWE-117
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- 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.

(As written by CVE List.)

## Affected

- morgan morgan: from 1.2.0 up to 1.10.1 (not affected: 1.11.0)
- morgan (npm): from 1.2.0 before 1.11.0
- morgan_project morgan: from 1.2.0 before 1.11.0

## Every score

- openjs: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`
- GitHub: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`

## References

- <https://github.com/expressjs/morgan/security/advisories/GHSA-4vj7-5mj6-jm8m> (mitigation, vendor-advisory, web)
- <https://cna.openjsf.org/security-advisories.html> (third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-5078> (advisory)
- <https://github.com/expressjs/morgan> (package)

## Sources

- CVE List: [CVE-2026-5078](https://www.cve.org/CVERecord?id=CVE-2026-5078), CVE Terms of Use, modified 2026-06-03
- GitHub Advisory Database: [GHSA-4vj7-5mj6-jm8m](https://github.com/advisories/GHSA-4vj7-5mj6-jm8m), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-5078](https://nvd.nist.gov/vuln/detail/CVE-2026-5078), Public domain, modified 2026-07-22

---

Page: https://cve.day/CVE-2026-5078 · Whole record: https://cve.day/CVE-2026-5078.json · Rebuilt by cve.day 2026-11-25T22:59:23.625Z
