SSRF
Last updated
Last updated
When an API fetches a remote resource without validating the user-supplied URL.
The attacker can force the app to send a request to an unexpected destination, such as localhost, bypassing firewalls or VPNs.
The web API stores the path of the files using the file
URI scheme, which is used to represent local file paths (Figure 1).
This path is stored under the /supplier-companies/current-user
endpoint (Figure 2).
The /api/v1/supplier-companies
PATCH
endpoint allows the user to modify the URI path (Figure 3); this should not be the case as it should be dynamically set only by the value defined by the /api/v1/supplier-companies/certificates-of-incorporation
POST
endpoint.
An attacker could leverage this flaw and read a local file, such as /etc/passwd
(Figure 4).