-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Context
The src/app/api/frames/route.ts fetches URLs provided by the user (or indirectly via Frame buttons) to parse OpenGraph metadata.
const response = await fetch(url, { ... });Problem
- SSRF (Server-Side Request Forgery): An attacker could provide a URL pointing to internal infrastructure (e.g.,
http://localhost:3000,http://169.254.169.254, or internal database ports). - Information Disclosure: The server might return error messages revealing internal network topology.
Proposed Solution
Implement an SSRF filter for the URL before fetching.
- Resolve the DNS of the target URL.
- Check if the IP address falls into private ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 127.0.0.0/8).
- Block requests to internal IPs.
- Use a library like
ssrf-req-filterif available, or implement strict regex checks.
Acceptance Criteria
- Requests to
localhostor127.0.0.1are rejected. - Requests to private IP ranges are rejected.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
No status