/

CVE-2026-54166

Severity:

HIGH RISK

(7.1)

Server-Side Request Forgery (CWE-918) in Shelf Import

CVE-2026-54166

Deferred

Vulnerability type

Category:

Server-Side Request Forgery

CWE:

CWE-918

Impact:

Internal Network Access, Cloud Metadata Exposure, and Resource Exhaustion

Severity:

HIGH RISK

(7.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

Shelf contains a server-side request forgery vulnerability in the Asset CSV Content Import feature, where authenticated users with the asset:import permission can cause the server to request attacker-controlled URLs. Weak URL validation and unrestricted response handling may allow access to internal services, cloud metadata endpoints, external hosts, or resources that consume excessive memory.

Affected context

The issue occurs in Shelf deployments that expose the Asset CSV Content Import feature and permit authenticated users to use it with the asset:import permission. Risk is increased where the application can reach internal network services, cloud metadata endpoints, or sensitive administrative interfaces, and where fetched response bodies are buffered before size checks.

Exploit preconditions

  • Attack surface: Asset CSV Content Import and its imageUrl processing logic
  • Required access: An authenticated account with the asset:import permission
  • Trigger point: Server-side fetching of a supplied image URL after input validation
  • Why exploitation is possible: URL validation can be bypassed through alternate URL characteristics or redirects, after which the server performs an unrestricted outbound request from its own network context
  • Additional condition: Large responses may increase risk when they are fully buffered before validation

Why this happens

The vulnerability results from treating attacker-influenced URL data as sufficiently trusted after incomplete validation. The validation logic can be bypassed using characteristics such as misleading suffixes, path keywords, domain substring matches, or redirect chains, while the subsequent fetch() operation does not adequately restrict destinations or redirects. This maps to CWE-918: Server-Side Request Forgery, because the application makes network requests on behalf of a user without enforcing a reliable destination policy. Buffering the complete response before applying size limits also reflects an unsafe resource-handling pattern.

Potential impact

  • Attackers may access services on the application's internal network
  • Cloud instance metadata or temporary credentials could be exposed
  • Internal administrative endpoints may be probed or reached
  • The application may send requests to arbitrary external hosts
  • Large responses could cause memory pressure or denial of service
  • Sensitive response data could be disclosed through application behavior

General mitigation guidance

Mitigation generally focuses on eliminating server-side requests to untrusted destinations and enforcing resource limits before data is retained.

Common defensive patterns include:

  • Use an explicit allowlist of permitted schemes, hosts, ports, and destinations
  • Resolve and validate destinations while accounting for redirects, DNS changes, alternate address forms, and private or link-local ranges
  • Disable or strictly constrain redirects for outbound fetches
  • Prefer trusted asset-proxy or storage workflows over arbitrary URL retrieval
  • Apply response size, time, connection, and concurrency limits before buffering content
  • Run outbound fetch functionality with restricted network egress and least-privilege service permissions
  • Avoid exposing cloud metadata services to application workloads where possible
  • Enforce authorization and tenant boundaries around import functionality

How teams detect issues like this

Organizations can look for SSRF risks through:

  • Static analysis rules identifying server-side HTTP clients that consume user-controlled URLs
  • Code review checks for incomplete URL validation, unrestricted redirects, and private-address filtering gaps
  • Tests covering alternate URL representations, DNS rebinding considerations, and redirect destinations
  • Network monitoring for application requests to private address ranges, metadata endpoints, unusual ports, or unexpected external domains
  • Resource telemetry that identifies oversized response buffering, elevated memory use, or abnormal outbound request volume
  • Policy enforcement requiring approved egress destinations and bounded response handling
  • Automated security review tools that flag user-controlled inputs reaching outbound request APIs

Sources

SourceLink
github.comgithub.com/Shelf-nu/shelf.nu/security/advisories/GHSA-xgrm-8w6v-mvjg

Frequently asked

questions

Yes, within the application's authorization model. An authenticated user with the asset:import permission may be able to trigger server-side requests through the import feature.

The key prerequisite is authenticated access with permission to use Asset CSV Content Import. The practical impact also depends on the application's network reachability and outbound permissions.

Avoid fetching arbitrary user-supplied URLs. If remote retrieval is required, use strict destination allowlists, validate resolved addresses and redirect targets, restrict egress, and enforce bounded streaming and response limits.

Combine secure URL-handling libraries, authorization controls, network segmentation, outbound request monitoring, and code-review or CI policies that detect untrusted input reaching HTTP client APIs.

Find out what's already
exploitable in your codebase.