Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 39a773e

Browse files
committed
Update README
1 parent c5abe6e commit 39a773e

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

‎README.md‎

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Something something regexes are bad.
1212

1313
## Starriness
1414

15-
Not sure what to call this. This reflects the complexity of the regular expression matcher's backtracking procedure with respect to the length of the entered string.
15+
This reflects the complexity of the regular expression matcher's backtracking procedure with respect to the length of the entered string.
1616

1717
With a starriness of 3, we have approximately cubic complexity. This means that if the vulnerable part of the string is doubled in length, the execution time should be 8 times longer (2^3).
1818
For exponential REDoS with starred stars e.g. `(a*)*$` a fudge factor is used and the starriness will be greater than 10.
@@ -127,7 +127,7 @@ regexploit-js my-module/my-file.js another/file.js
127127
regexploit-js "my-project/node_modules/**/*.js" --glob
128128
```
129129

130-
N.B. there are differences between javascript and python regex parsing so there may be some errors. I'm [not sure I want](https://hackernoon.com/the-madness-of-parsing-real-world-javascript-regexps-d9ee336df983) to write a JS regex AST!
130+
N.B. there are differences between javascript and python regex parsing so there may be some errors. I'm [not sure I want](https://hackernoon.com/the-madness-of-parsing-real-world-javascript-regexps-d9ee336df983) to write a JS regex AST! Also, use NodeJS version >=12.
131131

132132
## Ruby
133133

@@ -141,8 +141,23 @@ TODO: not so straight forward to extract the regexes because of the way they are
141141

142142
Unless you specifically use a non-deterministic finite automata, Go code is not vulnerable to this type of REDoS. It uses `re2` which does not have catastrophic backtracking.
143143

144+
## JSON / YAML
145+
146+
```bash
147+
regexploit-json *.json
148+
regexploit-yaml *.yaml
149+
```
150+
144151
# Bugs reported
145152

146-
* [cpython http.cookiejar](https://github.com/python/cpython/pull/17157)
147-
* [cpython CVE-2020-8492 urllib.request](https://github.com/python/cpython/commit/0b297d4ff1c0e4480ad33acae793fbaf4bf015b4)
148-
* [ua-parser CVE-2020-5243](https://github.com/ua-parser/uap-core/security/advisories/GHSA-cmcx-xhr8-3w9p)
153+
* [bpo-38804: cpython's http.cookiejar](https://github.com/python/cpython/pull/17157)
154+
* [CVE-2020-8492: cpython's urllib.request](https://github.com/python/cpython/commit/0b297d4ff1c0e4480ad33acae793fbaf4bf015b4)
155+
* [CVE-2020-5243: ua-parser uap-core](https://github.com/ua-parser/uap-core/security/advisories/GHSA-cmcx-xhr8-3w9p)
156+
* [CVE-2021-21236: CairoSVG](https://github.com/advisories/GHSA-hq37-853p-g5cf)
157+
* [python-markdown2](https://github.com/trentm/python-markdown2/pull/387)
158+
159+
## Credits
160+
161+
This tool has been created by Ben Caller of [Doyensec LLC](https://www.doyensec.com) during research time.
162+
163+
![alt text](https://doyensec.com/images/logo.svg "Doyensec Logo")

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /