The vulnerability is a stack overflow in eslint caused by uncontrolled recursion when handling objects with circular references. The analysis of the patch d683aebc8e0792e4f80bd1488c705c90f22c317e confirms this.
The primary vulnerable function is isSerializable in lib/shared/serialization.js. Before the patch, this function would recursively traverse an object to check if it was serializable. However, it did not keep track of visited objects. When given an object with a circular reference, it would enter an infinite loop of recursive calls, leading to a stack overflow. The patch fixes this by introducing a seenObjects Set to track visited objects and break the recursion if a cycle is detected.
A second, similar vulnerability was fixed in the freezeDeeply function within lib/rule-tester/rule-tester.js. This function also performed a deep traversal of an object and was susceptible to the same infinite recursion on circular references. The fix is identical, adding a seenObjects set to prevent cycles.
The entry point for triggering this vulnerability is the RuleTester.run method. This method is used to validate test cases for ESLint rules. As part of the validation, it checks for duplicate test cases, which involves serializing the test case objects. If a test case contains an object with a circular reference, it triggers the vulnerable isSerializable function, causing the crash. Therefore, RuleTester.run is a critical function in the exploit chain.
A runtime profile during exploitation would show a deep stack trace of isSerializable calling itself repeatedly, originating from a call to RuleTester.run. Similarly, freezeDeeply could also appear in the stack trace if it's called on a malicious object.