# GHSA-mgr7-5782-6jh9: The Umbraco Heartcore headless client library uses a vulnerable Refit dependency package

> A vulnerable Refit dependency in the Umbraco Heartcore client library allows CRLF injection, potentially enabling header smuggling or body content manipulation.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 13 Jan 2025

## What is GHSA-mgr7-5782-6jh9?

GHSA-mgr7-5782-6jh9 is a vulnerability in Umbraco.Headless.Client.Net, published on 13 Jan 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Impact
The Heartcore headless client library depends on [Refit ](https://github.com/reactiveui/refit) to assist in making HTTP requests to Heartcore public APIs. Refit recently published an advisory regarding a CRLF injection vulnerability whereby it is possible for a malicious user to smuggle additional headers or potentially body content into a request.

This shouldn't affect Heartcore client library usage as the vulnerable method - `HttpHeaders.TryAddWithoutValidation` - is not used. However, since Refit is a transient dependency for applications using this library, then any users making direct use of Refit could be vulnerable.

### Patches
The vulnerable version of Refit has been upgraded to a secure version, as of Umbraco.Headless.Client.Net version 1.5.0, available on [Nuget](https://www.nuget.org/packages/Umbraco.Headless.Client.Net/1.5.0).

### Workarounds
If calling Refit from your own code, set any necessary HTTP headers without use of `HttpHeaders.TryAddWithoutValidation`.

### References
See the [original Refit advisory](https://github.com/reactiveui/refit/security/advisories/GHSA-3hxg-fxwm-8gf7) for further info.

## Which versions are affected by GHSA-mgr7-5782-6jh9?

2 open source packages ship an affected version, including Umbraco.Headless.Client.Net.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `Umbraco.Headless.Client.Net` | NuGet | All versions | 1.5.0 |
| `Umbraco.Headless.Client.Net` | NuGet | All versions | 1.5.0 |

## How do I fix GHSA-mgr7-5782-6jh9?

Upgrade Umbraco.Headless.Client.Net to 1.5.0 or later.

## Is GHSA-mgr7-5782-6jh9 being exploited?

There is no known exploitation of GHSA-mgr7-5782-6jh9 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-mgr7-5782-6jh9 and fix it if it is affected.

What it is: GHSA-mgr7-5782-6jh9 is a vulnerability in Umbraco.Headless.Client.Net, published on 13 Jan 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-mgr7-5782-6jh9 in the wild and no public exploit code.

Affected packages and fixed versions:
- Umbraco.Headless.Client.Net (NuGet): affected all versions; fixed in 1.5.0
- Umbraco.Headless.Client.Net (NuGet): affected all versions; fixed in 1.5.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-mgr7-5782-6jh9/ (Markdown: https://insights.sbomify.com/GHSA-mgr7-5782-6jh9/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-mgr7-5782-6jh9

---
From sbomify Insights: https://insights.sbomify.com/GHSA-mgr7-5782-6jh9/
Summaries are generated and may contain mistakes; the official description above is the record.
