🛡️ CVE-2024-32980 — spin-sdk

🔴 CVSS 9.5 — Critical ✅ No Known Exploit CWE-610 NVD
9.5
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Spin applications with specific configuration vulnerable to potential network sandbox escape

Impact

Some specifically configured Spin applications that use self requests without a specified URL authority can be induced to make requests to arbitrary hosts via the Host HTTP header.

If an application's manifest contains a component with configuration such as

```toml

allowed_outbound_hosts = ["http://self", "https://self"]

```

and code such as

```rust

let res: Response = spin_sdk::http::send(

Request::new(Method::Get, "/") // Note: the request URI does not contain a URL authority

).await?;

```

Then that application can be induced to send an outgoing request to another host (leading the app to process the response assuming it comes from another component in the same application). This can be induced with a request such as

```shell

curl -H"Host: google.com:80" localhost:3000 # Assuming the application is served on localhost:3000

```

> Note: If using a SDK that does not use wasi:http/outgoing-handler, the port can be omitted from the URL.

Vulnerable Configurations

The following conditions need to be met for an application to be vulnerable:

1. The environment Spin is deployed in routes requests to the Spin runtime based on the request URL instead of the Host header, and leaves the Host header set to the original value by the client.

2. The Spin application's component handling the incoming request is configured with an allowed_outbound_hosts list containing "self".

3. In reaction to an incoming request, the component makes an outbound request whose URL doesn't include the hostname/port.

If all of these conditions apply, then Spin will use the inbound request's Host header to determine the authority part of the URL if none is explicitly provided in the request's URL.

Setups known not to be vulnerable

Fermyon's [Fermyon Cloud](https://developer.fermyon.com/cloud/index) serverless product and applications hosted on it are known not to be vulnerable.

Patches

_Has the problem been patched? What versions should users upgrade to?_

Spin version 2.4.3 is being released with this advisory going public.

Workarounds

For deployments of Spin, a workaround is to ensure that the Host header is sanitized to match the application a request is routed to.

For individual applications, multiple workarounds exist:

1. Ensure that outgoing requests always sanitize the Host header

2. Ensure that outgoing requests always provide the hostname in the URL and use that hostname in the allowed_outbound_hosts list instead of self

3. When using Spin 2.4, use [application-internal service chaining](https://developer.fermyon.com/spin/v2/http-outbound#local-service-chaining) for intra-application requests

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity high, availability none.

Weakness class

CVE-2024-32980 is classified as CWE-610: Externally Controlled Reference to a Resource in Another Sphere. The product uses an externally controlled name or reference that resolves to a resource that is outside of the intended control sphere.

Affected software

CVE-2024-32980 is recorded against 2 packages.

  • spin-sdk
  • unknown

Timeline and source

Published on 8 May 2024. No public exploit is currently recorded for this entry. Record sourced from NVD.

References

github.com (Web)
nvd.nist.gov (Advisory)
github.com (Web)
github.com (Package)

Details

Severity CRITICAL
CVSS Score 9.5
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
CWE CWE-610
Public Exploit ✅ No
Source NVD
Published 2024-05-08
Updated 2026-08-12
Modified 2024-05-08
Fix URL N/A

Affected Packages

Software From version Fixed in
spin-sdk
unknown

Exploit Protection

Are you running spin-sdk?

CVE-2024-32980 carries CVSS 9.5 Critical rating. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.

Check My Site For CVE-2024-32980 →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2024