/

CVE-2026-51583

Severity:

HIGH RISK

(8.5)

SSRF (CWE-918) in usememos Webhook Validation Handler

CVE-2026-51583

Deferred

Vulnerability type

Category:

Server-Side Request Forgery

CWE:

CWE-918

Impact:

Internal Network Access and Service Exposure

Severity:

HIGH RISK

(8.5)

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 vulnerability in usememos allows an authenticated remote attacker to influence webhook validation requests toward internal or otherwise restricted addresses.

If the application can reach sensitive network locations, this may expose internal services, metadata endpoints, or other resources that are not directly accessible to the attacker.

Affected context

The issue occurs in the webhook validation mechanism in internal/webhook/validate.go when a user-supplied webhook target is checked. Deployments may be at risk when authenticated users can create or modify webhooks and the server has network access to internal services, loopback addresses, cloud metadata endpoints, or other protected destinations.

Exploit preconditions

  • Attack surface: Remote webhook creation or configuration through the usememos application
  • Required access: Valid authentication and permission to configure or validate a webhook
  • Trigger point: Webhook target validation
  • Why exploitation is possible: The server performs outbound requests to an attacker-influenced target without sufficiently restricting internal or otherwise unauthorized destinations

Why this happens

The vulnerability results from insufficient validation and enforcement of trust boundaries around user-controlled webhook URLs. When a server uses an externally supplied target for validation without robust destination controls, it may be induced to make requests on the user's behalf to internal resources.

This behavior maps to CWE-918: Server-Side Request Forgery, where application-side network access is redirected to destinations that should not be reachable through the exposed functionality.

Potential impact

  • An attacker may query internal HTTP services
  • Sensitive service responses or configuration data could be exposed
  • Cloud instance metadata or temporary credentials may be reachable
  • Internal administrative interfaces could be probed or abused
  • Network segmentation controls may be weakened

General mitigation guidance

Mitigation generally focuses on treating webhook destinations as untrusted and enforcing outbound network policy.

Common defensive patterns include:

  • Allowing only explicitly approved schemes, hosts, ports, and destination ranges
  • Blocking loopback, link-local, private, multicast, and other restricted address spaces
  • Resolving hostnames and validating the resulting addresses before connecting
  • Rechecking destinations after redirects and disabling redirects where they are unnecessary
  • Applying egress firewall rules so the application cannot reach sensitive network segments
  • Using dedicated low-privilege workers for outbound webhook validation
  • Returning minimal validation responses and avoiding disclosure of fetched content

How teams detect issues like this

Organizations can identify SSRF risks through:

  • Static analysis of server-side HTTP clients that consume user-controlled URLs
  • Code review checks for missing scheme, hostname, port, redirect, and IP-range validation
  • Tests covering loopback, private, link-local, encoded, redirected, and DNS-rebinding destinations
  • Network monitoring for unexpected outbound connections from the application
  • Egress policies and alerts for access to metadata services or restricted address ranges
  • Automated security review tools that flag externally influenced request targets

Sources

SourceLink
gist.github.comgist.github.com/seiyaibuki0523/d8af15eb555808319a2633269a9ebb80
github.comgithub.com/usememos/memos

Frequently asked

questions

Yes. It can be reached remotely when an authenticated user is allowed to configure or validate a webhook and the server can connect to the selected destination.

Yes, based on the described condition, the attacker needs valid authentication and the permissions necessary to influence webhook configuration or validation.

Treat webhook URLs as untrusted, permit only approved destinations, block restricted address ranges, validate resolved addresses, and control redirects and outbound network access.

Combine centralized URL validation with restrictive egress policies, least-privilege service accounts, security-focused tests, and monitoring for unexpected server-side requests.

Find out what's already
exploitable in your codebase.