Security

Collections

A comprehensive guide to the dangers of Regular Expressions in JavaScript

This article explains how certain regex patterns can cause exponential backtracking on long strings, leading to regular expression denial of service (ReDoS) vulnerabilities.
Two real world examples caused major outages at Stack Overflow and CloudFlare due to unintentionally vulnerable regex use.

The article details how issues like excessive use of wildcards, quantifiers and overlapping patterns can cause catastrophic backtracking.
It also offers techniques for testing regex safety and fixing vulnerable patterns, such as limiting matches, using string methods instead of regex, and refactoring nested groups.
Overall, the article effectively raises awareness of the ReDoS threat within seemingly benign regex code.

AI

Memo

  • Since it's not been clearly stated: One attack vector might be that I step out to the bathroom for 5 minutes without locking computer, and evil hacker just dumps all my passwords before I come back.
    I think it's worthwhile considering this. There's a reason why password managers ask for a master password or passkey after 10 minutes. Since I thought Chrome relied on an encrypted enclave, it isn't quite feasible to extract passwords easily even with root access.
    Yes, you shouldn't leave your computer unattended. But that doesn't mean designing products that make exploiting the inevitable slipup fatal. - Microsoft Edge stores all passwords in memory in clear text, even when unused

Children
  1. 5 Software Security Goals All CTOs Should Prioritize
  2. API Security Best Practices - curity
  3. Acceptable Brute Force Attack Success Rate Industry Standard
  4. How to Secure Anything
  5. Security tools
  6. YAML 보안 취약점 정리