CVE-2019-5413
Description
The npm package morgan before version 1.9.1 contains a command injection vulnerability via the format parameter.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
The npm package morgan before version 1.9.1 contains a command injection vulnerability via the format parameter.
Vulnerability
The npm package morgan is an HTTP request logger middleware for Node.js. Versions prior to 1.9.1 are vulnerable to a command injection attack through its format parameter. An attacker can inject arbitrary commands by providing a specially crafted string to the format option, which is then passed unsanitized to functions that execute shell commands [1][2][3].
Exploitation
An attacker can exploit this vulnerability by sending a malicious HTTP request that includes a crafted format parameter value. While the typical usage of the format parameter in morgan is for server-side configuration, any user or external actor who can control the format argument (e.g., through an application's API endpoint that passes user input to the morgan format option) can inject arbitrary shell commands. No authentication is required if the vulnerable endpoint is exposed [1][2][3].
Impact
Successful exploitation allows the attacker to execute arbitrary commands on the server with the privileges of the Node.js process. This can lead to full server compromise, including data exfiltration, file modification, or further lateral movement within the network [1][2][3].
Mitigation
Users should upgrade morgan to version 1.9.1 or later, which was released on March 25, 2019 and includes a fix for this vulnerability. If upgrading is not immediately possible, users should avoid passing untrusted user input to the format option of morgan [3].
AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
morgannpm | < 1.9.1 | 1.9.1 |
Affected products
2Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
9- github.com/advisories/GHSA-gwg9-rgvj-4h5jghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2019-5413ghsaADVISORY
- github.com/nodejs/security-wg/blob/master/vuln/npm/473.jsonghsaWEB
- hackerone.com/reports/390881ghsax_refsource_MISCWEB
- lists.apache.org/thread.html/r8ba4c628fba7181af58817d452119481adce4ba92e889c643e4c7dd3%40%3Ccommits.netbeans.apache.org%3Emitremailing-listx_refsource_MLIST
- lists.apache.org/thread.html/r8ba4c628fba7181af58817d452119481adce4ba92e889c643e4c7dd3@%3Ccommits.netbeans.apache.org%3EghsaWEB
- lists.apache.org/thread.html/rb5ac16fad337d1f3bb7079549f97d8166d0ef3082629417c39f12d63%40%3Cnotifications.netbeans.apache.org%3Emitremailing-listx_refsource_MLIST
- lists.apache.org/thread.html/rb5ac16fad337d1f3bb7079549f97d8166d0ef3082629417c39f12d63@%3Cnotifications.netbeans.apache.org%3EghsaWEB
- www.npmjs.com/advisories/736ghsaWEB
News mentions
0No linked articles in our index yet.