CVE-2019-5413
Executive Summary
The CVE-2019-5413 vulnerability in the npm package morgan (versions <1.9.1) allows an attacker to inject arbitrary commands via the 'format' parameter. By crafting a malicious format string, an attacker can execute shell commands on the host running the application, leading to full remote code execution. This flaw can be exploited in any Node.js web application that uses morgan for logging without sanitizing the format input. Mitigation involves upgrading to morgan 1.9.1 or later, or sanitizing the format string.
Authoritative CVE Metadata
- CVSS Base Score: 9.8 (CRITICAL)
- Last Modified: 02-11-26
Original Description
An attacker can use the format parameter to inject arbitrary commands in the npm package morgan < 1.9.1.