Skip to content

Commit 1f57fae

Browse files
committed
fix bug 0.0.0.0 can bypass SSRFChecker
1 parent a0e66f2 commit 1f57fae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/joychou/security/SSRFChecker.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static Boolean isInnerIPByUrl(String url) {
8282
*/
8383
private static boolean isInnerIp(String strIP){
8484

85-
String blackSubnetlist[] = {"10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "127.0.0.0/8"};
85+
String blackSubnetlist[] = {"10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "127.0.0.0/8", "0.0.0.0/32"};
8686

8787
for (String subnet: blackSubnetlist) {
8888
SubnetUtils utils = new SubnetUtils(subnet);

0 commit comments

Comments
 (0)