CVE-2026-87859
morgan vulnerable to Log Injection via unescaped double quote in quoted log fields
morgan is an HTTP request logger middleware for Node.js. In versions before 1.12.1, its escapeLogField() function does not escape the double quote character, which delimits the quoted fields of the Apache combined log format that morgan emits. An unauthenticated remote attacker who controls a value written to a quoted field, such as the User-Agent or Referer header, can include a double quote to close that field early, so a log consumer that parses the log by field position reads attacker-supplied text as the following field. In the built-in formats this makes the recorded value differ from the value that was sent, and in custom formats that quote an attacker-controlled token before a server-controlled one it can forge values such as the response status. No newline is injected, so record separation stays intact. The issue is fixed in morgan 1.12.1, which escapes the double quote. Users should upgrade to morgan 1.12.1 or later.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
5.3
morgan vulnerable to Log Injection via unescaped double quote in quoted log fields
morgan is an HTTP request logger middleware for Node.js. In versions before 1.12.1, its escapeLogField() function does not escape the double quote character, which delimits the quoted fields of the Apache combined log format that morgan emits. An unauthenticated remote attacker who controls a value written to a quoted field, such as the User-Agent or Referer header, can include a double quote to close that field early, so a log consumer that parses the log by field position reads attacker-supplied text as the following field. In the built-in formats this makes the recorded value differ from the value that was sent, and in custom formats that quote an attacker-controlled token before a server-controlled one it can forge values such as the response status. No newline is injected, so record separation stays intact. The issue is fixed in morgan 1.12.1, which escapes the double quote. Users should upgrade to morgan 1.12.1 or later.
- Record
CVE-2026-87859- 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 - Weakness
- CWE-117
- Updated
- 2026-11-02
EUVDEUVD-2026-76027
5.3
morgan is an HTTP request logger middleware for Node.js. In versions before 1.12.1, its escapeLogField() function does not escape the double quote character, which delimits the quoted fields of the Apache combined log format that morgan emits. An unauthenticated remote attacker who controls a value written to a quoted field, such as the User-Agent or Referer header, can include a double quote to close that field early, so a log consumer that parses the log by field position reads attacker-supplied text as the following field. In the built-in formats this makes the recorded value differ from the value that was sent, and in custom formats that quote an attacker-controlled token before a server-controlled one it can forge values such as the response status. No newline is injected, so record separation stays intact. The issue is fixed in morgan 1.12.1, which escapes the double quote. Users should upgrade to morgan 1.12.1 or later.
- Record
EUVD-2026-76027- 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 - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-9f6g-j8ch-79g4
5.3
morgan vulnerable to Log Injection via unescaped double quote in quoted log fields
Impact
Morgan writes attacker-controlled request data to the access log. Its escaping (added in 1.11.0 and 1.12.0) neutralizes control characters, the Unicode line separators, and backslash, but not the double quote (0x22), which is the field delimiter of the Apache combined log format morgan emits. An attacker who controls a quoted field (:user-agent, :referrer, the request URL, or the Basic auth :remote-user) can inject a double quote to close the field early and forge additional fields in the log record. The combined, common, and default formats, and any custom format that quotes a token, are affected. This is an incomplete fix of CVE-2026-5078 and CVE-2026-15603.
Patches
Users should upgrade to version 1.12.1.
Workarounds
Update to version 1.12.1.
- Record
GHSA-9f6g-j8ch-79g4- 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 - Weakness
- CWE-117
- Updated
- 2026-11-02
NVD
5.3
morgan is an HTTP request logger middleware for Node.js. In versions before 1.12.1, its escapeLogField() function does not escape the double quote character, which delimits the quoted fields of the Apache combined log format that morgan emits. An unauthenticated remote attacker who controls a value written to a quoted field, such as the User-Agent or Referer header, can include a double quote to close that field early, so a log consumer that parses the log by field position reads attacker-supplied text as the following field. In the built-in formats this makes the recorded value differ from the value that was sent, and in custom formats that quote an attacker-controlled token before a server-controlled one it can forge values such as the response status. No newline is injected, so record separation stays intact. The issue is fixed in morgan 1.12.1, which escapes the double quote. Users should upgrade to morgan 1.12.1 or later.
- Record
CVE-2026-87859- 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 - Weakness
- CWE-117
- Updated
- 2026-11-02
OSV
5.3
morgan vulnerable to Log Injection via unescaped double quote in quoted log fields
morgan is an HTTP request logger middleware for Node.js. In versions before 1.12.1, its escapeLogField() function does not escape the double quote character, which delimits the quoted fields of the Apache combined log format that morgan emits. An unauthenticated remote attacker who controls a value written to a quoted field, such as the User-Agent or Referer header, can include a double quote to close that field early, so a log consumer that parses the log by field position reads attacker-supplied text as the following field. In the built-in formats this makes the recorded value differ from the value that was sent, and in custom formats that quote an attacker-controlled token before a server-controlled one it can forge values such as the response status. No newline is injected, so record separation stays intact. The issue is fixed in morgan 1.12.1, which escapes the double quote. Users should upgrade to morgan 1.12.1 or later.
- Record
CVE-2026-87859- 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 - Weakness
- CWE-117
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2026-87859
5.3
morgan is an HTTP request logger middleware for Node.js. In versions before 1.12.1, its escapeLogField() function does not escape the double quote character, which delimits the quoted fields of the Apache combined log format that morgan emits. An unauthenticated remote attacker who controls a value written to a quoted field, such as the User-Agent or Referer header, can include a double quote to close that field early, so a log consumer that parses the log by field position reads attacker-supplied text as the following field. In the built-in formats this makes the recorded value differ from the value that was sent, and in custom formats that quote an attacker-controlled token before a server-controlled one it can forge values such as the response status. No newline is injected, so record separation stays intact. The issue is fixed in morgan 1.12.1, which escapes the double quote. Users should upgrade to morgan 1.12.1 or later.
- Record
DEBIAN-CVE-2026-87859- 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 - Updated
- 2026-11-02
Show 6 moreShow less
OSVGHSA-9f6g-j8ch-79g4
5.3
morgan vulnerable to Log Injection via unescaped double quote in quoted log fields
Impact
Morgan writes attacker-controlled request data to the access log. Its escaping (added in 1.11.0 and 1.12.0) neutralizes control characters, the Unicode line separators, and backslash, but not the double quote (0x22), which is the field delimiter of the Apache combined log format morgan emits. An attacker who controls a quoted field (:user-agent, :referrer, the request URL, or the Basic auth :remote-user) can inject a double quote to close the field early and forge additional fields in the log record. The combined, common, and default formats, and any custom format that quotes a token, are affected. This is an incomplete fix of CVE-2026-5078 and CVE-2026-15603.
Patches
Users should upgrade to version 1.12.1.
Workarounds
Update to version 1.12.1.
- Record
GHSA-9f6g-j8ch-79g4- 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 - Weakness
- CWE-117
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2026-87859
5.3
morgan is an HTTP request logger middleware for Node.js. In versions before 1.12.1, its escapeLogField() function does not escape the double quote character, which delimits the quoted fields of the Apache combined log format that morgan emits. An unauthenticated remote attacker who controls a value written to a quoted field, such as the User-Agent or Referer header, can include a double quote to close that field early, so a log consumer that parses the log by field position reads attacker-supplied text as the following field. In the built-in formats this makes the recorded value differ from the value that was sent, and in custom formats that quote an attacker-controlled token before a server-controlled one it can forge values such as the response status. No newline is injected, so record separation stays intact. The issue is fixed in morgan 1.12.1, which escapes the double quote. Users should upgrade to morgan 1.12.1 or later.
- Record
UBUNTU-CVE-2026-87859- 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 - Updated
- 2026-11-02
OSVCLSA-2026-1790673247 No score
TuxCare security update for morgan (1 CVE)
TuxCare rebuilt morgan to address 1 CVE. Fixed in 1.6.1-tuxcare.4.
- Record
CLSA-2026-1790673247- Updated
- 2026-11-02
OSVCLSA-2026-1790676372 No score
TuxCare security update for morgan (1 CVE)
TuxCare rebuilt morgan to address 1 CVE. Fixed in 1.5.3-tuxcare.4.
- Record
CLSA-2026-1790676372- Updated
- 2026-11-02
OSVCLSA-2026-1792164155 No score
TuxCare security update for morgan (3 CVEs)
TuxCare rebuilt morgan to address 3 CVEs. Fixed in 1.10.1-tuxcare.1.
- Record
CLSA-2026-1792164155- Updated
- 2026-11-02
OSVCLSA-2026-1792496584 No score
TuxCare security update for morgan (2 CVEs)
TuxCare rebuilt morgan to address 2 CVEs. Fixed in 1.11.0-tuxcare.2.
- Record
CLSA-2026-1792496584- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
morgannpm |
before 1.12.1 | 1.12.1 |
morganTuxCare:npm |
1.6.1-tuxcare.0 up to 1.6.1-tuxcare.4, plus listed versions 1.6.11.6.1-tuxcare.11.6.1-tuxcare.21.6.1-tuxcare.3 |
1.6.1-tuxcare.4 |
morganTuxCare:npm |
1.5.3-tuxcare.0 up to 1.5.3-tuxcare.4, plus listed versions 1.5.31.5.3-tuxcare.11.5.3-tuxcare.21.5.3-tuxcare.3 |
1.5.3-tuxcare.4 |
morganTuxCare:npm From an advisory covering 3 CVEs |
1.10.1-tuxcare.0 up to 1.10.1-tuxcare.1, plus listed versions 1.10.1 |
1.10.1-tuxcare.1 |
morganTuxCare:npm From an advisory covering 2 CVEs |
1.11.0-tuxcare.0 up to 1.11.0-tuxcare.2, plus listed versions 1.11.0 |
1.11.0-tuxcare.2 |
node-morganDebian:12 |
All versions, plus listed versions 1.10.0+~1.9.3-11.10.1+~1.9.10-11.12.0+~1.9.10-11.12.1+~1.9.10-1 |
None known |
node-morganDebian:13 |
All versions, plus listed versions 1.10.0+~1.9.3-11.10.1+~1.9.10-11.12.0+~1.9.10-11.12.1+~1.9.10-1 |
None known |
node-morganDebian:14 |
before 1.12.1+~1.9.10-1, plus listed versions 1.10.0+~1.9.3-11.10.1+~1.9.10-11.12.0+~1.9.10-1 |
1.12.1+~1.9.10-1 |
node-morganUbuntu:22.04:LTS |
All versions, plus listed versions 1.10.0-2 |
None known |
node-morganUbuntu:24.04:LTS |
All versions, plus listed versions 1.10.0+~1.9.3-1 |
None known |
node-morganUbuntu:26.10 |
All versions, plus listed versions 1.10.1+~1.9.10-1 |
None known |
node-morganUbuntu:26.04:LTS |
All versions, plus listed versions 1.10.0+~1.9.3-11.10.1+~1.9.10-1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-87859 is a medium vulnerability (CVSS 5.3) in Morgan, published September 11, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.41%, the 35th percentile. Fixed in morgan 1.12.1.
References
github.com/expressjs/morgan/security/advisories/GHSA-9f6g-j8ch-79g4
cna.openjsf.org/security-advisories.html
nvd.nist.gov/vuln/detail/CVE-2026-87859
github.com/expressjs/morgan/commit/4b695edf967ce179cdf4009fe8cddd184b7511ee
github.com/expressjs/morgan/releases/tag/1.12.1
github.com/advisories/GHSA-9f6g-j8ch-79g4