github / github/codeql

Remediation advice in SSRF could be more broadly focused

未关闭
#18,815 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
question
主要语言
CodeQL
星标
10.1k
派生
2.1k
平均合并
2 天 15 小时
30 天内合并 PR
141

描述

**Description of the issue**

The [remediation advice for how to mitigate SSRF vulnerabilities ](https://github.com/github/codeql/blob/main/python/ql/src/Security/CWE-918/ServerSideRequestForgery-end.inc.qhelp#L7) is focused on URL allowlisting. While this is fairly good for https schemes where possible to implement, it's not really a comprehensive defense for SSRF.

The advice given assumes that an attacker can't manipulate DNS entries for the domain being allowlisted. It also doesn't offer any advice for mitigating SSRF if an attacker has complete control of the URL and an allowlist isn't practical.

It would be good to add a sentence to the advice to make the remediation advice less specific. Perhaps incorporating a mention of additional network or application controls to prevent servers from making connections to internal resources in the first place (e.g. based on IP addresses).

https://owasp.org/Top10/A10_2021-Server-Side_Request_Forgery_%28SSRF%29/

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。