ブックマーク / qiita.com/prograti (1)

  • 正規表現の落とし穴(ReDoS - Regular Expressions DoS) - Qiita

    過去にWordPressを題材にしていろいろな脆弱性のケーススタディを取り上げました。 Webアプリケーションの脆弱性ケーススタディ(WordPress編) Webアプリケーションの脆弱性ケーススタディ(WordPress編その2) 今回は、ReDoS(Regular Expressions DoS)について取り上げてみたいと思います。ReDoSとはOWASPによると以下のように記載されています。 The Regular expression Denial of Service (ReDoS) is a Denial of Service attack, that exploits the fact that most Regular Expression implementations may reach extreme situations that cause them to wor

    正規表現の落とし穴(ReDoS - Regular Expressions DoS) - Qiita
    yarumato
    yarumato 2018/09/08
    “バックトラック処理数の指数関数的増加で制限(PHPではデフォルトで100万)オーバーして停止。対応:*や+を削除。{n}でマッチ回数制限。アンカー(^)付与。長い文字列は正規表現処理させない。正規表現処理しない”
  • 1