CVE-2026-5078

Source
https://cve.org/CVERecord?id=CVE-2026-5078
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-5078.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-5078
Aliases
Downstream
Published
2026-06-03T05:56:49.512Z
Modified
2026-07-16T03:48:36.672111641Z
Severity
  • 5.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N CVSS Calculator
Summary
morgan vulnerable to Log Forging via unneutralized control characters in :remote-user
Details

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.

Database specific
{
    "cna_assigner": "openjs",
    "cwe_ids": [
        "CWE-117"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/5xxx/CVE-2026-5078.json"
}
References

Affected packages

Git / github.com/expressjs/morgan

Affected ranges

Type
GIT
Repo
https://github.com/expressjs/morgan
Events
Database specific
{
    "source": [
        "AFFECTED_FIELD",
        "CPE_RANGE"
    ],
    "cpe": "cpe:2.3:a:morgan_project:morgan:*:*:*:*:*:node.js:*:*",
    "extracted_events": [
        {
            "introduced": "1.2.0"
        },
        {
            "last_affected": "1.10.1"
        },
        {
            "fixed": "1.11.0"
        }
    ]
}

Affected versions

1.*
1.10.0
1.2.0
1.2.1
1.2.2
1.2.3
1.3.0
1.3.1
1.3.2
1.4.0
1.4.1
1.5.0
1.5.1
1.5.2
1.5.3
1.6.0
1.6.1
1.7.0
1.8.0
1.8.1
1.8.2
1.9.0
1.9.1

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-5078.json"