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
imageUrlprocessing logic - Required access: An authenticated account with the
asset:importpermission - 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

