Summary
A server-side request forgery vulnerability in NASA Earthdata Search's scale endpoint may allow a remote attacker to cause the server to make unintended network requests. The issue becomes risky when attacker-controlled request data influences the image-scaling operation's outbound destination without adequate validation or network restrictions.
Affected context
The vulnerability occurs in the scaleImage function within
serverless/src/scaleImage/handler.js, which serves the scale endpoint.
Deployments are potentially affected when this endpoint is remotely reachable
and request-controlled values can influence server-side resource retrieval.
Impact depends on the network access available to the serverless runtime and
the protections applied to outbound requests.
Exploit preconditions
- Attack surface: The remotely accessible scale endpoint
- Required access: Ability to submit requests to the endpoint; authentication requirements depend on deployment configuration
- Trigger point: Processing of attacker-influenced input by the
scaleImagehandler - Why exploitation is possible: The server may initiate outbound requests based on insufficiently constrained input, allowing an attacker to influence the destination
Why this happens
The underlying bug is a failure to adequately separate trusted application
configuration from untrusted request data when constructing server-side
network requests. If a handler accepts attacker-controlled resource locations
without strict destination validation, it can be induced to access internal,
local, or otherwise unintended services. This behavior maps to
CWE-918: Server-Side Request Forgery.
Potential impact
- An attacker could cause requests to internal services
- The server may expose responses or metadata from reachable resources
- Cloud or runtime service credentials could be placed at risk if accessible through the network
- Internal network reconnaissance could become possible
- The vulnerability could support broader compromise when combined with other weaknesses
General mitigation guidance
Mitigation generally focuses on reducing control over outbound destinations
and enforcing network-layer restrictions.
Common defensive patterns include:
- Allowing requests only to explicitly approved schemes, hosts, ports, and paths
- Resolving and validating destinations before connecting, including protection against DNS rebinding and redirect-based bypasses
- Avoiding direct use of user-supplied URLs in server-side fetch operations
- Disabling unnecessary redirects and blocking loopback, link-local, private, and metadata-service ranges
- Applying egress filtering and least-privilege network permissions to the runtime
- Separating image retrieval from sensitive internal networks where practical
- Limiting response size, connection time, and request rate
How teams detect issues like this
Detection approaches commonly include:
- Static analysis for server-side HTTP clients whose destinations derive from request parameters
- Code review checks for URL construction, redirect handling, DNS resolution, and allowlist enforcement
- Policy rules requiring explicit outbound-host validation for serverless handlers
- Runtime monitoring of unusual egress destinations, access to private address ranges, and unexpected metadata-service requests
- Automated security testing that verifies blocked access to internal and restricted network locations

