github / github/codeql

Remediation advice in SSRF could be more broadly focused

Offen
#18,815 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
question
Vorherrschende Sprache
CodeQL
Sterne
10.1k
Forks
2.1k
Ø Merge
2 T. 15 Std.
Gemergte PRs (30 T.)
141

Beschreibung

**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/

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit python/ql/src/Security/CWE-918/ServerSideRequestForgery-end.inc.qhelp bei den im Issue verlinkten Hinweisen zur Behebung und vergleiche sie anschließend mit den OWASP-SSRF-Richtlinien. Erweitere die Hinweise über URL-Allowlisting hinaus, sodass zusätzliche Netzwerk- oder Anwendungskontrollen erwähnt werden, und stelle sicher, dass der endgültige Text sowohl allowlisted als auch von Angreifern kontrollierte URLs behandelt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Bereich
documentation, security
Issue-Typ
Dokumentation
Schwierigkeit
1/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.