Skip to content

Security: Server-Side Request Forgery (SSRF) in Twitter API endpoint - #218

Open
tomaioo wants to merge 1 commit into
SplashtopInc:masterfrom
tomaioo:fix/security/server-side-request-forgery-ssrf-in-twit
Open

Security: Server-Side Request Forgery (SSRF) in Twitter API endpoint#218
tomaioo wants to merge 1 commit into
SplashtopInc:masterfrom
tomaioo:fix/security/server-side-request-forgery-ssrf-in-twit

Conversation

@tomaioo

@tomaioo tomaioo commented May 14, 2026

Copy link
Copy Markdown

Summary

Security: Server-Side Request Forgery (SSRF) in Twitter API endpoint

Problem

Severity: Critical | File: pages/api/twitter.js:L1

In pages/api/twitter.js, the endpoint header from the request is used directly to make API calls without validation. An attacker can manipulate the 'endpoint' header to make the server request arbitrary URLs, potentially accessing internal services or exfiltrating data.

Solution

Add whitelist validation for allowed Twitter API endpoints. Only allow requests to known Twitter API domains (e.g., api.twitter.com). Remove the ability for clients to specify arbitrary endpoints.

Changes

  • pages/api/twitter.js (modified)

In pages/api/twitter.js, the endpoint header from the request is used directly to make API calls without validation. An attacker can manipulate the 'endpoint' header to make the server request arbitrary URLs, potentially accessing internal services or exfiltrating data.

Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant