Skip to content

Commit bf4ab23

Browse files
authored
Merge pull request #6094 from kingthorin/code-scan
ascanrulesBeta: Address ReDoS in Insecure HTTP Methods rule
2 parents e7829b1 + d2e1fa1 commit bf4ab23

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

addOns/ascanrulesBeta/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
77
### Changed
88
- Replace usage of CWE-200 for the Insecure HTTP Method scan rule (Issue 8714).
99

10+
### Fixed
11+
- Address potential/theoretical reDoS issue in the Insecure HTTP Method scan rule.
12+
1013
## [57] - 2025-01-15
1114
### Changed
1215
- Update minimum ZAP version to 2.16.0.

addOns/ascanrulesBeta/src/main/java/org/zaproxy/zap/extension/ascanrulesBeta/InsecureHttpMethodScanRule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public void scan() {
149149
String thirdpartyHost = "www.google.com";
150150
int thirdpartyPort = 80;
151151
Pattern thirdPartyContentPattern =
152-
Pattern.compile("<title.*Google.*/title>", Pattern.CASE_INSENSITIVE);
152+
Pattern.compile("<title.*{1,10}Google.{1,25}/title>", Pattern.CASE_INSENSITIVE);
153153

154154
// send an OPTIONS message, and see what the server reports. Do
155155
// not try any methods not listed in those results.

0 commit comments

Comments
 (0)