Skip to content

Commit a5101bd

Browse files
authored
Merge pull request #18855 from Kwstubbs/ssrf_documentation
Python: Add more documentation in regards to SSRF
2 parents e79cb44 + 04476ca commit a5101bd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

python/ql/src/Security/CWE-918/ServerSideRequestForgery-end.inc.qhelp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
<recommendation>
66

77
<p>To guard against SSRF attacks you should avoid putting user-provided input directly
8-
into a request URL. Instead, either maintain a list of authorized URLs on the server and choose
9-
from that list based on the input provided, or perform proper validation of the input.
8+
into a request URL. On the application level, maintain a list of authorized URLs on the server and choose
9+
from that list based on the input provided. If that is not possible, one should verify the IP address for all user-controlled
10+
requests to ensure they are not private. This requires saving the verified IP address of each domain,
11+
then utilizing a custom HTTP adapter to ensure that future requests to that domain use the verified IP address.
12+
On the network level, you can segment the vulnerable application into its own LAN or block access to specific devices.
1013
</p>
1114

1215
</recommendation>

0 commit comments

Comments
 (0)