Skip to main content

lilconfig CVE-2024-21537

HIGH
Code Injection (CWE-94)
2024-10-31 report@snyk.io
8.9
CVSS 4.0 · Vendor: snyk
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify app passing untrusted input to lilconfig loader
  2. Delivery
    Craft malicious module id/config string
  3. Exploit
    Reach eval in dynamicImport via defaultLoaders
  4. Execution
    Execute arbitrary JavaScript in Node process
  5. Impact
    Full compromise of application context

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the consuming application pass attacker-controlled input into lilconfig's defaultLoaders / dynamicImport path - i.e., the module identifier or config location that lilconfig resolves must be influenced by untrusted data. The vulnerable code path is the eval inside dynamicImport, reachable via defaultLoaders, and only in lilconfig 3.1.0. Limiting factors: this is not a default risk for typical integrations, where lilconfig receives trusted, developer-defined config paths; realistic exploitation depends on a non-default usage pattern where user input flows into the loader. No authentication is enforced by the library itself (PR:N), and no user interaction is required at the library level, but the practical AV:N 'network' reachability is contingent on the host application exposing that data flow. Only the single version 3.1.0 is affected, further narrowing exposure.

Impact

The signals partly conflict and warrant caution. The CVSS 4.0 vector (AV:N/AC:L/PR:N/UI:N, VC:H/VI:H/VA:H, E:P) portrays a trivially reachable, unauthenticated, full-impact RCE, but this is a library-level flaw whose network reachability and 'no privileges required' characterization depend entirely on whether the consuming application exposes the defaultLoaders input to untrusted data - most applications feed lilconfig their own trusted config file paths, not attacker-controlled strings. EPSS at 1.06% (61st percentile) and the absence of KEV listing are consistent with that reality: a high CVSS but comparatively low real-world exploitation probability, driven by the specificity of the required data flow. Proof-of-concept exploit maturity (E:P) confirms the eval sink is real and demonstrable, so this is a genuine issue to patch, but for most deployments it is a lower-priority high-CVSS finding rather than a widespread emergency. Note the conflict explicitly: the AC:L/PR:N rating assumes attacker-controlled loader input, whereas realistic exploitation requires a non-default usage pattern - verify how your application invokes lilconfig before treating this as network-exploitable.

Exploit ScenarioDerived

An application uses lilconfig 3.1.0 to load a configuration whose path or module identifier is derived from user-supplied input (for example a request parameter or an uploaded project). The attacker supplies a crafted string that, when passed through defaultLoaders into the dynamicImport eval, is evaluated as JavaScript, executing arbitrary code in the Node.js process; a proof-of-concept demonstrating this eval sink is publicly available.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 1.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 29, 2026

Arbitrary code execution in the lilconfig npm configuration loader (version 3.1.0, fixed in 3.1.1) lets an attacker who controls input reaching the defaultLoaders function run arbitrary JavaScript, because the dynamicImport helper resolves modules through an insecure eval call (CWE-94). The flaw was reported by Snyk and carries a CVSS 4.0 base score of 8.9; publicly available exploit code exists (E:P in the vector), but there is no public exploit identified in CISA KEV and EPSS is a modest 1.06% (61st percentile), indicating exploitation hinges on how the host application feeds data into the loader rather than broad opportunistic attacks.

RemediationAI

Vendor-released patch: upgrade lilconfig to 3.1.1 or later, which removes the insecure eval-based dynamic import (see release https://github.com/antonk52/lilconfig/releases/tag/v3.1.1, fix PR https://github.com/antonk52/lilconfig/pull/48, and commit https://github.com/antonk52/lilconfig/commit/2c68a1ab8764fc74acc46771e1ad39ab07a9b0a7). Because lilconfig is frequently a transitive dependency, run npm/yarn/pnpm audit and use lockfile overrides (npm 'overrides' or yarn 'resolutions') to force 3.1.1 across nested dependents, then rebuild. If you cannot upgrade immediately, the concrete compensating control is to ensure no attacker-controlled value ever reaches lilconfig's loader input: pass only trusted, application-defined config file paths to lilconfig/lilconfigSync and defaultLoaders, and refuse to derive the searched module id from user input, request parameters, or uploaded content - the trade-off is that you must audit and possibly refactor any dynamic-config feature that lets users specify config locations. Consult the Snyk advisory at https://security.snyk.io/vuln/SNYK-JS-LILCONFIG-6263789 for tracking.

Affected Packages

npm lilconfig fix: 3.1.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

lilconfig is a lightweight, dependency-free JavaScript configuration file loader for Node.js, functionally similar to cosmiconfig and widely pulled in transitively by tooling that reads project config (PostCSS, stylelint and related ecosystems). The vulnerability is a CWE-94 code injection: the internal dynamicImport function builds and executes code via eval to perform a dynamic import of a module identifier, so if the identifier or path passed through defaultLoaders is attacker-influenced, that string is evaluated as JavaScript rather than safely imported. The exact affected package is npm 'lilconfig' 3.1.0 (also surfaced as the WebJars/Maven mirror org.webjars.npm:lilconfig per the second Snyk reference); no CPE strings were supplied in the input, so identification rests on the package coordinates in the description and references.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (snyk) PRIMARY 8.9 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P
vuln.today AI 8.1 HIGH

Full RCE impact justifies C/I/A:H, but reaching the eval sink requires attacker-controlled input to flow into the loader (a non-default app pattern), so AC:H rather than the vendor's AC:L.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (snyk).

CVSS VectorVendor: snyk

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
Analysis Updated
Jul 29, 2026 - 16:30 vuln.today
v1 - CVSS changed
CVSS changed
Jul 29, 2026 - 16:22 NVD
8.8 (HIGH) 8.9 (HIGH)
CVE Published
Oct 31, 2024 - 05:15 cve.org
HIGH 8.8

DescriptionCVE.org

Versions of the package lilconfig from 3.1.0 and before 3.1.1 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.

Executive ViewAI

Why It Matters

lilconfig versions prior to 3.1.1 contain an arbitrary code execution vulnerability (CVSS 8.9) with publicly available exploit code. Any application or dependency using lilconfig 3.1.0 is at immediate risk if exposed to untrusted configuration input. Organizations must prioritize patching all affected instances to version 3.1.1 to prevent potential system compromise.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
1.1%
Top 39% exploitable
Prevalence
High
widely used Node.js config loader, common transitive dependency of build tooling
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 1.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

45
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy