safe-regex safeguards your Node.js applications against ReDoS (Regular Expression Denial of Service) attacks. It analyzes regular expressions for vulnerability to excessive backtracking, preventing potential slowdowns or crashes. By identifying regex patterns that could take exponentially longer to process based on input, safe-regex helps developers write more robust and secure code, ensuring application stability. It offers a crucial defense against exploits that leverage inefficient regular expressions.
The safe-regex npm package saw initial releases in 2013, with sporadic updates until 2019. The most active period was 2018-2019, with versions 2.0.0 to 2.1.1 being published. Since October 2019, there have been no new releases, indicating a period of inactivity exceeding 5 years as of August 2025.
Safe-regex npm package downloads experienced a surge between February and December 2024, peaking in November. Download numbers remained relatively consistent in early 2025, with a notable spike in June 2025. August 2025 shows a significant decrease, likely due to incomplete data for the month.