CVE-2025-50537

5.5 MEDIUM

📋 TL;DR

A stack overflow vulnerability in ESLint versions before 9.26.0 allows denial of service when processing test cases with circular references. This affects developers and CI/CD pipelines using ESLint's RuleTester for custom rule validation. The vulnerability is triggered during test case serialization checks.

💻 Affected Systems

Products:
  • ESLint
Versions: All versions before 9.26.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects usage of RuleTester.run() method with circular reference objects in test cases.

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete denial of service causing ESLint processes to crash, potentially disrupting CI/CD pipelines and development workflows.

🟠

Likely Case

Local development environment crashes when running specific test suites with circular references in RuleTester.

🟢

If Mitigated

Minimal impact if proper input validation prevents circular references from reaching vulnerable code paths.

🌐 Internet-Facing: LOW - ESLint is primarily a development tool, not typically exposed to external networks.
🏢 Internal Only: MEDIUM - Internal development and CI/CD systems could experience service disruption.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploit requires developer access to modify test cases. Public proof-of-concept demonstrates the crash condition.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 9.26.0

Vendor Advisory: https://github.com/eslint/eslint/issues/19646

Restart Required: No

Instructions:

1. Update ESLint package: npm update eslint
2. Verify version: eslint --version
3. Ensure version is 9.26.0 or higher

🔧 Temporary Workarounds

Avoid circular references in RuleTester

all

Modify test cases to avoid passing objects with circular references to RuleTester.run() method

🧯 If You Can't Patch

  • Implement input validation to detect and reject circular reference objects before passing to RuleTester
  • Monitor ESLint processes for crashes and implement automatic restart mechanisms

🔍 How to Verify

Check if Vulnerable:

Check ESLint version: eslint --version. If version is below 9.26.0, system is vulnerable.

Check Version:

eslint --version

Verify Fix Applied:

After update, verify version is 9.26.0 or higher and test that RuleTester no longer crashes with circular references.

📡 Detection & Monitoring

Log Indicators:

  • ESLint process crashes with stack overflow errors
  • RuleTester test failures with recursion depth exceeded

SIEM Query:

process.name:"eslint" AND (error:"stack overflow" OR error:"maximum call stack size exceeded")

🔗 References

📤 Share This