Command execution via shell-interpolated template argument
Published Feb 26, 2022 · Updated Aug 2, 2024
OS command injection in Strapi before 4.1.0 allows local users to execute commands through create-strapi-app's template argument. The project generator passes the untrusted package name into execa.shell strings for npm view and npm install, allowing shell metacharacters to alter the commands. Exploitation requires the ability to invoke the project generator with a crafted template value, and injected commands run with the invoking user's privileges.
Summary
What happened
OS command injection in Strapi before 4.1.0 allows local users to execute commands through create-strapi-app's template argument. The project generator passes the untrusted package name into execa.shell strings for npm view and npm install, allowing shell metacharacters to alter the commands. Exploitation requires the ability to invoke the project generator with a crafted template value, and injected commands run with the invoking user's privileges.
The record
- CVE
- CVE-2022-0764
- Published
- Feb 26, 2022
- Updated
- Aug 2, 2024
- Vendor
- Strapi
- Product
- Strapi
- Classifications
- CWE-78, T1059
- Attack vector
- local
- Privileges
- admin
Timeline
How it unfolded
- Feb 26, 2022CVE publishedPublication date reported by the CVE source.
- Aug 2, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=unspecified <4.1.0
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Huntr template-argument command-injection exploitproof of concept · unverified
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo