{"id":"CVE-2026-5078","state":"PUBLISHED","title":"morgan vulnerable to Log Forging via unneutralized control characters in :remote-user","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.","publishedAt":"2026-06-03T05:56:49.512Z","updatedAt":"2026-06-03T13:19:32.922Z","severity":{"score":5.3,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","source":"openjs"},"assigner":"openjs","products":["morgan morgan"],"affected":[{"vendor":"morgan","product":"morgan","packageURL":"pkg:npm/morgan","defaultStatus":"unaffected","versions":[{"version":"1.2.0","status":"affected","lessThanOrEqual":"1.10.1","versionType":"semver"},{"version":"1.11.0","status":"unaffected","versionType":"semver"}]}],"references":["https://github.com/expressjs/morgan/security/advisories/GHSA-4vj7-5mj6-jm8m","https://cna.openjsf.org/security-advisories.html"],"weaknesses":["CWE-117"],"ingestedAt":"2026-10-29T20:12:32.778Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/5xxx/CVE-2026-5078.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-5078","state":"PUBLISHED","datePublished":"2026-06-03T05:56:49.512Z","dateUpdated":"2026-06-03T13:19:32.922Z","assignerShortName":"openjs","assignerOrgId":"ce714d77-add3-4f53-aff5-83d477b104bb","dateReserved":"2026-03-28T17:42:51.328Z"},"containers":{"cna":{"title":"morgan vulnerable to Log Forging via unneutralized control characters in :remote-user","descriptions":[{"lang":"en","value":"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":[{"vendor":"morgan","product":"morgan","packageURL":"pkg:npm/morgan","defaultStatus":"unaffected","versions":[{"version":"1.2.0","status":"affected","lessThanOrEqual":"1.10.1","versionType":"semver"},{"version":"1.11.0","status":"unaffected","versionType":"semver"}]}],"references":[{"url":"https://github.com/expressjs/morgan/security/advisories/GHSA-4vj7-5mj6-jm8m"},{"url":"https://cna.openjsf.org/security-advisories.html"}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV3_1":{"version":"3.1","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"LOW","availabilityImpact":"NONE","baseSeverity":"MEDIUM","baseScore":5.3,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-117","lang":"en","description":"CWE-117: Improper Output Neutralization for Logs","type":"CWE"}]}],"providerMetadata":{"shortName":"openjs","orgId":"ce714d77-add3-4f53-aff5-83d477b104bb","dateUpdated":"2026-06-03T05:56:49.512Z"},"credits":[{"lang":"en","value":"Yuki Matsuhashi","type":"reporter"},{"lang":"en","value":"Ulises Gascón","type":"remediation developer"},{"lang":"en","value":"Jon Church","type":"remediation developer"}],"x_generator":{"engine":"cve-kit 1.0.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-06-03T13:16:59.663217Z","id":"CVE-2026-5078","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-06-03T13:19:32.922Z"}}]}}}