All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Regolith: A ReDoS-Immune TypeScript/JavaScript Regex Library Using Rust for Linear Time Complexity

By

roggenbuck

9mo ago· 13 min readenCode

Summary

Regolith is a server-side TypeScript and JavaScript library designed to prevent Regular Expression Denial of Service (ReDoS) attacks by using Rust and linear regular expressions under the hood. It serves as a drop-in replacement for standard RegExp with linear worst-case time complexity instead of exponential, making it immune to ReDoS vulnerabilities while requiring minimal code changes.

Key quotes

· 4 pulled
A server-side TypeScript and JavaScript library immune to Regular Expression Denial of Service (ReDoS) attacks by using Rust and linear RegEx under the hood
Regolith has a linear worst case time complexity, compared to the default RegExp found in TypeScript and JavaScript, which has an exponential worst case
I wanted a Regex library for TypeScript and JavaScript where I didn't have to worry about ReDoS attacks
Regolith attempts to be a drop-in replacement for RegExp and requires minimal (to no) changes to be used instead
Snippet from the RSS feed
A server-side TypeScript and JavaScript library immune to Regular Expression Denial of Service (ReDoS) attacks by using Rust and linear RegEx under the hood. Regolith has a linear worst case time c...

You might also wanna read