CVE-2019-5413 Code Injection in morgan

Critical 9.8 Published Updated

Attackers can execute arbitrary commands via the format parameter in the morgan logging library, requiring an upgrade to secure the application.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2019-5413?

CVE-2019-5413 is a critical command injection vulnerability in morgan, published on 17 Mar 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

An attacker can use the format parameter to inject arbitrary commands in the npm package morgan < 1.9.1.

Weakness: CWE-77, CWE-94

Which versions are affected by CVE-2019-5413?

2 open source packages ship an affected version, including morgan. It affects 1 product.

PackageAffectedFixed in
morgan npmAll versions1.9.1
morgan npmAll versions1.9.1

Products include Morgan Project Morgan.

How do I fix CVE-2019-5413?

Upgrade morgan to 1.9.1 or later.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2019-5413 being exploited?

There is no known exploitation of CVE-2019-5413 in the wild and no public exploit code.

Public exploit code: 3 proofs of concept on GitHub.

Sources

Also known as CLSA-2026-1773620211, CLSA-2026-1784682761, GHSA-gwg9-rgvj-4h5j, ROOT-APP-NPM-CVE-2019-5413.

Is CVE-2019-5413 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free