CVE-2026-137058 in cron-parser
Summary
by MITRE • 11/25/2026
Cron-parser before 5.10.1 contains an unbounded memory allocation vulnerability in CronExpressionParser.parse() that allows unauthenticated attackers to exhaust memory by supplying oversized cron fields. Attackers can submit a roughly 1.6 MB expression of repeated wildcard tokens that expand into huge arrays, exhausting the V8 heap and crashing the Node.js process.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 11/28/2026
The vulnerability identified in Cron-parser versions through 5.10.0 represents a critical unbounded memory allocation flaw within the core parsing logic of the library. Specifically, this issue resides in the parse method of the CronExpressionParser class, which is responsible for interpreting cron schedule strings into executable time-based triggers. The root cause lies in how the parser handles wildcard tokens and repeated patterns within the input string. When an attacker supplies a maliciously crafted cron expression containing oversized fields or excessive repetitions of wildcards, the internal logic fails to enforce reasonable limits on array expansion. Instead of rejecting the malformed input early, the library attempts to expand these expressions into large data structures in memory. This lack of bounds checking allows for uncontrolled growth of allocated resources, leading directly to a denial of service condition by exhausting available system memory or the V8 JavaScript engine heap space.
From an operational perspective, this vulnerability poses a severe risk to any Node.js application that relies on Cron-parser for scheduling tasks such as background jobs, data synchronization, or automated reports. Because the flaw allows unauthenticated attackers to trigger it simply by submitting specific input strings, often via API endpoints or configuration interfaces that accept cron expressions, there is no need for prior authentication. An attacker can send a payload of approximately 1.6 megabytes consisting of repeated wildcard tokens. Upon processing this expression, the parser expands these tokens into massive arrays, rapidly consuming memory resources until the Node.js process crashes due to out-of-memory errors. This results in immediate service disruption, potentially affecting all users and dependent services that rely on the affected application for timely execution of scheduled tasks.
This vulnerability aligns with CWE-789: Uncontrolled Memory Allocation, as it involves allocating excessive amounts of memory based on untrusted input without adequate validation or size constraints. Furthermore, from a threat modeling perspective using the MITRE ATT&CK framework, this behavior is characteristic of T1496: Resource Hijacking, where an attacker consumes system resources to degrade performance or cause denial of service. It also reflects aspects of CWE-20: Improper Input Validation, as the parser does not adequately sanitize or limit the complexity and size of the cron expressions it processes before attempting expansion. The lack of input validation allows a relatively small but structurally complex payload to trigger disproportionate resource consumption, highlighting a failure in defensive coding practices regarding memory management during parsing operations.
To mitigate this vulnerability, organizations must immediately upgrade Cron-parser to version 5.10.1 or later, where the developers have implemented fixes to limit array sizes and prevent unbounded expansion of wildcard tokens. For applications that cannot be updated instantly due to dependency constraints, implementing a web application firewall rule to block cron expressions exceeding a certain length can provide temporary protection. Additionally, input validation logic should be introduced at the application layer to reject any cron strings that contain excessive repetitions or unusually long fields before they reach the parsing library. Monitoring system memory usage and setting appropriate heap limits in Node.js environments can also help mitigate the impact by causing controlled failures rather than uncontrolled crashes, although upgrading remains the only definitive solution.