Arbitrary Code Execution Affecting org.webjars.npm:lilconfig package, versions [3.1.0,3.1.1)
Threat Intelligence
Exploit Maturity
Proof of concept
EPSS
0.05% (17th
percentile)
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-JAVA-ORGWEBJARSNPM-8323736
- published 3 Nov 2024
- disclosed 22 Feb 2024
- credit Anton Kastritskiy
Introduced: 22 Feb 2024
CVE-2024-21537 Open this link in a new tabHow to fix?
Upgrade org.webjars.npm:lilconfig
to version 3.1.1 or higher.
Overview
org.webjars.npm:lilconfig is an A zero-dependency alternative to cosmiconfig
Affected versions of this package are vulnerable to Arbitrary Code Execution due to the insecure usage of eval
in the dynamicImport
function. An attacker can exploit this vulnerability by passing a malicious input through the defaultLoaders
function.
PoC
const { defaultLoaders } = require('lilconfig');
const maliciousInput = "'+console.log('hacked!!!')+'";
defaultLoaders[".js"](maliciousInput);