Summary
The binary property-list parser in the plist npm package can repeatedly resolve shared, self-referencing array and dictionary objects without memoizing results. An unauthenticated attacker who can submit a crafted plist to an application using the parser may cause exponential processing and memory growth, potentially crashing the Node.js process.
Affected context
The issue affects the binary plist parsing path in plist.js versions before 5.0.1. It becomes a risk when an application parses attacker-controlled binary plist data: recursive resolution of shared object references can trigger excessive repeated work and memory allocation.
Exploit preconditions
- Attack surface: An application exposes binary plist parsing to untrusted input.
- Required access: The described attack does not require authentication when that parsing interface is publicly reachable.
- Trigger point: The parser resolves array or dictionary object references during
parseBinary. - Why exploitation is possible: Shared recursive references are resolved without effective memoization or sufficient resource bounds, allowing processing and memory use to grow exponentially.
Why this happens
The parser recursively resolves shared object references but does not sufficiently memoize completed resolutions or bound recursive work. As references chain through arrays and dictionaries, the same objects can be processed repeatedly, causing exponential resource consumption. This is primarily CWE-674: Uncontrolled Recursion, and is also associated with CWE-776: Improper Restriction of Recursive Entity References.
Potential impact
- A Node.js process may consume excessive memory or CPU.
- The process could terminate due to an out-of-memory condition.
- Applications relying on the process may become unavailable.
- Repeated requests could disrupt service availability.
General mitigation guidance
Defensive approaches focus on bounding parser work and limiting trust in incoming data:
- Prefer parsers that reject cyclic or otherwise invalid references by default.
- Track resolved objects and use memoization or cycle detection to avoid repeated recursive work.
- Apply explicit limits to recursion depth, reference resolution, input size, and total parsing effort.
- Avoid parsing untrusted binary plist data unless required, and validate inputs before they reach the parser where feasible.
- Run parsing workloads with resource limits and isolate them from critical application processes.
How teams detect issues like this
- Review code paths that pass external or user-controlled data to binary plist parsers.
- Use static analysis or code review to identify recursive reference resolution without memoization, cycle detection, or work limits.
- Test parsers with malformed and deeply connected reference structures while monitoring CPU, memory, and termination behavior.
- Enforce request-size and parsing-resource policies at service boundaries; automated code review tools may help flag risky parsing patterns.

