/

CVE-2026-56285

Severity:

HIGH RISK

(8.6)

SSRF via Weak HMAC Validation (CWE-918) in Nitter

CVE-2026-56285

Deferred

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918, CWE-1188

Impact:

Internal network and metadata service exposure

Severity:

HIGH RISK

(8.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Nitter's /video media proxy endpoint allows crafted requests to bypass domain validation by abusing a hardcoded default HMAC key.

An unauthenticated attacker can generate valid HMACs for arbitrary URLs and induce the server to fetch HTTP responses from internal or external hosts, including cloud metadata services.

Affected context

The vulnerability appears in Nitter instances that expose the /video media proxy endpoint and rely on HMAC-signed URLs to restrict outbound requests to Twitter/X domains.

When a hardcoded default HMAC key is present and URL targets are not rigorously validated, the proxy can be repurposed as a generic HTTP client to reach any host accessible from the Nitter server.

This becomes most impactful in deployments where Nitter can egress to internal services, cloud metadata endpoints, or other sensitive infrastructure components.

Exploit preconditions

  • Attack surface: Publicly accessible /video media proxy endpoint.
  • Required access: No authentication needed; attacker only needs HTTP access to Nitter.
  • Trigger point: Submission of a crafted URL parameter whose HMAC is computed using the known hardcoded key.
  • Why exploitation is possible: The application accepts HMACs generated with a predictable key and does not enforce strict domain or scheme restrictions, allowing redirection of the proxy to arbitrary internal or external hosts.

Why this happens

The issue stems from a combination of weak request origin control and insecure cryptographic key management.

Nitter's media proxy uses HMAC-signed URLs to guard outbound requests but relies on a hardcoded, default key that can be known or derived by attackers.

Coupled with insufficient validation of target URLs against an allowlist of Twitter/X domains, the proxy logic effectively becomes a general-purpose HTTP client for untrusted users.

This aligns with CWE-918: Server-Side Request Forgery (SSRF) and CWE-1188: Insecure Default Initialization of Resource, where default configuration values undermine security controls and allow untrusted input to influence backend network interactions.

Potential impact

  • Attackers may retrieve data from internal HTTP services not exposed to the public internet.
  • Attackers could access cloud provider metadata endpoints and potentially obtain credentials or instance configuration details.
  • Internal APIs, admin panels, or monitoring endpoints can be probed for sensitive information.
  • SSRF can be chained with other weaknesses to pivot deeper into the infrastructure or escalate privileges.

General mitigation guidance

Effective mitigation focuses on restricting outbound requests and hardening key management practices.

Recommended patterns include:

  • Enforcing strict allowlists for domains and schemes that the media proxy is permitted to contact, rejecting any non-Twitter/X targets.
  • Eliminating hardcoded or default HMAC keys and requiring unique, unpredictable secrets managed via secure configuration or secrets management systems.
  • Designing proxy components to operate with minimal network reach, limiting access to internal segments and disallowing connections to known sensitive endpoints such as cloud metadata services.
  • Applying network-level controls (e.g., firewall rules, egress filters) so application servers cannot freely initiate requests to arbitrary internal or external addresses.

How teams detect issues like this

Detection can focus on both code-level patterns and runtime behavior.

At the code level:

  • Static analysis or manual review for outbound HTTP clients that consume user-provided URLs without robust domain or scheme validation.
  • Identification of hardcoded cryptographic keys, default secrets, or configuration values used for request signing.
  • Checks for proxy-like endpoints that forward responses from arbitrary URLs back to users.

At runtime:

  • Monitoring egress traffic from Nitter instances for unusual destinations, especially internal IP ranges or cloud metadata endpoints.
  • Applying policy-based controls that flag or block requests to non-approved domains initiated from application servers.

Automated security testing tools that specialize in SSRF can be integrated into CI/CD pipelines to exercise proxy endpoints with crafted URLs and confirm domain restrictions are enforced.

Sources

SourceLink
github.comgithub.com/zedeus/nitter/commit/44b2f096f67da2cc257a0e262a94a7ae79e95d47
github.comgithub.com/zedeus/nitter/issues/1411
vulncheck.comvulncheck.com/advisories/nitter-server-side-request-forgery-in-video-media-proxy-endpoint

Frequently asked

questions

Yes. Any remote user with HTTP access to the affected Nitter instance can attempt to exploit the /video media proxy endpoint without authentication.

Only network access to the Nitter server is required. The attacker does not need valid credentials or prior access to internal systems.

The most robust pattern is to combine strict domain allowlists with secure, non-default HMAC keys managed via a proper secrets mechanism, and to ensure the proxy never accepts arbitrary URLs from user input.

Future designs should treat proxy endpoints as high-risk, enforce strong validation of all outbound targets, avoid hardcoded secrets, and couple application-level controls with network egress restrictions to prevent servers from being abused as SSRF pivots.

Find out what's already
exploitable in your codebase.