node-morgan — security advisory
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.
- Products
- node-morgan
- Affected versions
- 1.10.0+~1.9.3-1, 1.10.0-2, 1.10.1+~1.9.10-1
- Fixed versions
- Not specified
- CVEs
- CVE-2026-5078
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 02:27 UTC · Revision 1
Source evidence
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.
osv:UBUNTU-CVE-2026-5078
node-morgan
Fixed versions: Not specified
node-morgan
Fixed versions: Not specified
node-morgan
Fixed versions: Not specified
node-morgan
Fixed versions: Not specified
node-morgan
Fixed versions: Not specified
Complete source record
{
"id": "7bda1e2b3ceb807fd3ab5e0f75eb8c732543db0fb4b66db41cee01763568c054",
"url": "https://osv.dev/vulnerability/UBUNTU-CVE-2026-5078",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "UBUNTU-CVE-2026-5078",
"summary": "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.",
"evidence": "osv:UBUNTU-CVE-2026-5078",
"products": [
{
"name": {
"value": "node-morgan",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.10.0-2",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "node-morgan",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.10.0+~1.9.3-1",
"evidence": "/affected/1/versions"
}
]
},
{
"name": {
"value": "node-morgan",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.10.0+~1.9.3-1",
"evidence": "/affected/2/versions"
}
]
},
{
"name": {
"value": "node-morgan",
"evidence": "/affected/3/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.10.1+~1.9.10-1",
"evidence": "/affected/3/versions"
}
]
},
{
"name": {
"value": "node-morgan",
"evidence": "/affected/4/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.10.0+~1.9.3-1",
"evidence": "/affected/4/versions"
},
{
"value": "1.10.1+~1.9.10-1",
"evidence": "/affected/4/versions"
}
]
}
],
"severity": "medium",
"structured": {
"id": "UBUNTU-CVE-2026-5078",
"aliases": [
"UBUNTU-CVE-2026-5078"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
},
{
"type": "Ubuntu",
"score": "medium"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-morgan",
"purl": "pkg:deb/ubuntu/node-morgan?arch=source&distro=jammy",
"ecosystem": "Ubuntu:22.04:LTS"
},
"versions": [
"1.10.0-2"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-5078.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-morgan",
"binary_version": "1.10.0-2"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-morgan",
"purl": "pkg:deb/ubuntu/node-morgan?arch=source&distro=noble",
"ecosystem": "Ubuntu:24.04:LTS"
},
"versions": [
"1.10.0+~1.9.3-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-5078.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-morgan",
"binary_version": "1.10.0+~1.9.3-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-morgan",
"purl": "pkg:deb/ubuntu/node-morgan?arch=source&distro=questing",
"ecosystem": "Ubuntu:25.10"
},
"versions": [
"1.10.0+~1.9.3-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-5078.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-morgan",
"binary_version": "1.10.0+~1.9.3-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-morgan",
"purl": "pkg:deb/ubuntu/node-morgan?arch=source&distro=stonking",
"ecosystem": "Ubuntu:26.10"
},
"versions": [
"1.10.1+~1.9.10-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-5078.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-morgan",
"binary_version": "1.10.1+~1.9.10-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-morgan",
"purl": "pkg:deb/ubuntu/node-morgan?arch=source&distro=resolute",
"ecosystem": "Ubuntu:26.04:LTS"
},
"versions": [
"1.10.0+~1.9.3-1",
"1.10.1+~1.9.10-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-5078.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-morgan",
"binary_version": "1.10.1+~1.9.10-1"
}
]
}
}
],
"modified": "2026-10-17T12:58:33.460364260Z",
"provider": "osv",
"upstream": [
"CVE-2026-5078"
],
"references": [
"https://ubuntu.com/security/CVE-2026-5078",
"https://www.cve.org/CVERecord?id=CVE-2026-5078",
"https://cna.openjsf.org/security-advisories.html",
"https://github.com/expressjs/morgan/security/advisories/GHSA-4vj7-5mj6-jm8m"
]
},
"related_cves": [
{
"value": "CVE-2026-5078",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 358760,
"published_at": "2026-06-03T08:16:00+00:00"
}