Skip to content

SSRF Vulnerability in HTTPRequestManager #63

@retrymp3

Description

@retrymp3

Security: SSRF Vulnerability in HTTPRequestManager

Summary

I've identified a Server-Side Request Forgery (SSRF) vulnerability in Valdi's HTTP client that allows applications to make requests to arbitrary URLs (localhost, private IPs, cloud metadata) without validation.

Component: HTTPRequestManagerModuleFactory.cpp
Vulnerable Code: Lines 50-97

Vulnerability Details

User-provided URLs are passed directly to native HTTP request managers without validation:

// Line 51: URL extracted without validation
auto url = requestObject.getMapValue("url").toStringBox();

// Line 94-97: URL used directly
requestManager->performRequest(HTTPRequest(std::move(url), ...));

Missing: Scheme validation, IP filtering, hostname validation, URL sanitization

Impact

  • Critical: Cloud metadata access → Complete cloud account compromise (if app runs on EC2/GCP/Azure)
  • High: Internal service access → Data exposure, unauthorized access
  • Medium-High: Network reconnaissance → Internal network mapping

Proof of Concept

POC repository: https://github.com/retrymp3/Valdi_SSRF.git (see apps/ssrf_poc/)

Test with: http://localhost:8080, http://169.254.169.254/, etc.

Proposed Fix

I have prepared a fix that adds URL validation:

  • Blocks localhost, private IPs, cloud metadata IPs
  • Only allows http:// and https:// schemes
  • Validates URLs before making requests

Fix PR: #58

Disclosure Process

I attempted to report via HackerOne but was informed the Valdi repository is not in scope. I was advised to submit a GitHub PR. Also I couldn't see any opensource projects in Snapchat's scope on hackerone.

Question: What is the proper process for reporting security issues in Valdi or any of the opensource projects of Snapchat? Is there a seperate channel for this? hackerone does not to seem have any associated assets or scope.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions