/

CVE-2026-50887

Severity:

CRITICAL RISK

(9.1)

Server-Side Request Forgery (CWE-918) in Shlink URLs

CVE-2026-50887

Deferred

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Internal Network Scanning and Potential Data Exposure

Severity:

CRITICAL RISK

(9.1)

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

A server-side request forgery (SSRF) flaw in Shlink's automatic short URL title resolution lets attackers control where the server makes outbound HTTP requests when processing a crafted long URL.

By abusing this behavior, an attacker can coerce the application to probe internal or otherwise inaccessible network resources, making internal scanning and information gathering possible.

Affected context

This vulnerability appears when Shlink is configured to automatically resolve and store the title of a target page during short URL creation.

In this mode, the backend server fetches the content of the user-supplied longUrl and follows redirects as needed.

If there is no strict validation or restriction on the destination, the application may issue HTTP requests to arbitrary hosts, including internal addresses (e.g., 127.0.0.1, metadata services, or private VPC endpoints), as dictated by attacker-controlled input.

Exploit preconditions

  • Attack surface: HTTP(S) endpoints responsible for creating or managing short URLs that trigger automatic title resolution.
  • Required access: Ability to submit or influence a longUrl parameter; this may be via a public API, authenticated panel, or integrated service.
  • Trigger point: The server-side logic that fetches the remote resource to extract the page title when a new short link is created or updated.
  • Why exploitation is possible: The application trusts the user-supplied URL and allows the backend HTTP client to reach arbitrary network locations without robust restriction of schemes, hostnames, IP ranges, or redirect chains.

Why this happens

The core issue is a lack of network-level and URL-level validation in a feature that performs server-initiated HTTP requests based on user input.

When the title resolution component accepts arbitrary URLs and forwards them directly to an HTTP client, the server becomes a proxy that attackers can steer toward internal or sensitive endpoints.

This behavior maps to CWE-918: Server-Side Request Forgery (SSRF), where user-controlled URLs are used by the server to make outbound requests, violating network trust boundaries.

Potential impact

  • Discovery and mapping of internal HTTP services and ports accessible from the Shlink host.
  • Access to internal administrative panels or service APIs not exposed to the public internet.
  • Interaction with cloud metadata services (where reachable), which could lead to retrieval of credentials or configuration data.
  • Use of the application as a stepping stone for more targeted attacks against adjacent services.
  • Potential exposure of sensitive response data (headers, bodies, error messages) via logs or response channels.

General mitigation guidance

Effective mitigation generally focuses on constraining server-initiated requests and tightening trust boundaries around user-controlled URLs.

Pattern-based mitigations include:

  • Implementing strict allowlists for outbound destinations, such as limiting title resolution to public internet domains and explicitly excluding private or reserved IP ranges.
  • Validating URLs at multiple layers (syntax, scheme, host, and resolved IP) before any outbound request is made, rejecting unsupported schemes and suspicious hosts.
  • Normalizing and re-resolving DNS names to ensure that redirects or DNS changes cannot bypass filters, and blocking direct IP-based URLs where appropriate.
  • Isolating the HTTP client used for title resolution within a constrained network segment or egress policy that cannot reach sensitive internal resources.
  • Providing configuration options to disable automatic title resolution in higher-risk deployments, or to run it in a separate, locked-down service with minimal privileges.

How teams detect issues like this

SSRF issues in URL resolution features can be surfaced through a combination of code-focused and operational detection techniques.

Potential strategies include:

  • Static analysis rules that flag server-side HTTP client usage where destination URLs are derived from user input without robust sanitization or host/IP validation.
  • Code review checklists that require reviewers to examine any feature performing backend URL fetches (e.g., link preview, title resolution, webhook callbacks) and verify network restrictions.
  • Security testing that injects URLs pointing to known internal or non-routable addresses, monitoring whether requests are made and how responses are handled.
  • Network-level controls and logging (e.g., egress firewalls, proxy logs) that can highlight unusual outbound patterns from the application, such as requests to internal ranges initiated from user-facing endpoints.
  • Integrating automated application security testing tools in CI/CD pipelines to detect SSRF patterns around HTTP client usage and URL processing functions.

Sources

SourceLink
gist.github.comgist.github.com/pyuysig/9de95fb39eb089a4346570d791af99a6

Frequently asked

questions

Exploitability depends on how exposed the short URL creation interface is; if the endpoint accepting longUrl values is public or easily reachable, attackers may be able to exploit the SSRF without authentication.

In many deployments, only the ability to submit or influence a long URL is required. If that capability is available to anonymous users, no additional privileges are needed; otherwise, exploitation is constrained to whoever can create or modify short links.

The most robust fix is to enforce strict outbound request policies: validate and normalize all user-supplied URLs, block private and loopback IP ranges, limit schemes to HTTP/HTTPS, and optionally restrict outbound traffic through a controlled proxy or allowlist.

Design server-initiated HTTP features with the assumption that URLs may be attacker-controlled, apply strong URL and network validation, isolate such features in constrained environments, and institutionalize secure code review practices focusing on outbound HTTP clients and URL handling.

Find out what's already
exploitable in your codebase.