File tree Expand file tree Collapse file tree
java/ql/src/Security/CWE/CWE-918 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66
77<overview >
8- <p >Directly incorporating user input into a HTTP request without validating the input
8+ <p >Directly incorporating user input into an HTTP request without validating the input
99can facilitate Server Side Request Forgery (SSRF) attacks. In these attacks, the server
10- may be tricked into making a request and interacting with an attacker-controlled server.
10+ may be tricked into making a request and interacting with an attacker-controlled server.
1111</p >
1212
1313</overview >
1414<recommendation >
1515
1616<p >To guard against SSRF attacks, it is advisable to avoid putting user input
17- directly into the request URL. Instead, maintain a list of authorized
17+ directly into a request URL. Instead, maintain a list of authorized
1818URLs on the server; then choose from that list based on the user input provided.</p >
1919
2020</recommendation >
2121<example >
2222
23- <p >The following example shows an HTTP request parameter being used directly in a forming a
23+ <p >The following example shows an HTTP request parameter being used directly to form a
2424new request without validating the input, which facilitates SSRF attacks.
2525It also shows how to remedy the problem by validating the user input against a known fixed string.
2626</p >
You can’t perform that action at this time.
0 commit comments