# CVE-2023-27483: fieldpath's Paved.SetValue allows growing arrays up to arbitrary sizes in crossplane-runtime

> Attackers can cause out-of-memory panics in applications using crossplane-runtime by providing large array indices to the SetValue method.

- **Severity:** Medium 5.9 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 9 Mar 2023
- **Updated:** 25 Feb 2025
- **Also known as:** GHSA-vfvj-3m3g-m532, GO-2023-1623

## What is CVE-2023-27483?

CVE-2023-27483 is a medium-severity denial of service vulnerability in crossplane-runtime, published on 9 Mar 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

crossplane-runtime is a set of go libraries used to build Kubernetes controllers in Crossplane and its related stacks. An out of memory panic vulnerability has been discovered in affected versions. Applications that use the `Paved` type's `SetValue` method with user provided input without proper validation might use excessive amounts of memory and cause an out of memory panic. In the fieldpath package, the Paved.SetValue method sets a value on the Paved object according to the provided path, without any validation. This allows setting values in slices at any provided index, which grows the target array up to the requested index, the index is currently capped at max uint32 (4294967295) given how indexes are parsed,  but that is still an unnecessarily large value. If callers are not validating paths' indexes on their own, which most probably are not going to do, given that the input is parsed directly in the SetValue method, this could allow users to consume arbitrary amounts of memory. Applications that do not use the `Paved` type's `SetValue` method are not affected. This issue has been addressed in versions 0.16.1 and 0.19.2. Users are advised to upgrade. Users unable to upgrade can parse and validate the path before passing it to the `SetValue` method of the `Paved` type, constraining the index size as deemed appropriate.

Weakness: CWE-400 (Uncontrolled Resource Consumption), CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2023-27483?

5 open source packages ship an affected version, including github.com/crossplane/crossplane-runtime. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/crossplane/crossplane-runtime` | Go | From 0.17.0 | 0.19.2 |
| `github.com/crossplane/crossplane-runtime` | Go | From 0.17.0 | 0.19.2 |
| `github.com/crossplane/crossplane-runtime` | Go | From 0.6.0 | 0.16.1, 0.19.2 |
| `github.com/crossplane/crossplane-runtime` | Go | From 0.6.0 | 0.16.1 |
| `github.com/crossplane/crossplane-runtime` | Go | From 0.6.0 | 0.16.1 |

Products: Crossplane Crossplane-Runtime.

## How do I fix CVE-2023-27483?

Upgrade github.com/crossplane/crossplane-runtime to a fixed version for your release line: 0.19.2 or 0.16.1.

## Is CVE-2023-27483 being exploited?

There is no known exploitation of CVE-2023-27483 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-27483 and fix it if it is affected.

What it is: CVE-2023-27483 is a medium-severity denial of service vulnerability in crossplane-runtime, published on 9 Mar 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-27483 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/crossplane/crossplane-runtime (Go): affected from 0.17.0; fixed in 0.19.2
- github.com/crossplane/crossplane-runtime (Go): affected from 0.17.0; fixed in 0.19.2
- github.com/crossplane/crossplane-runtime (Go): affected from 0.6.0; fixed in 0.16.1, 0.19.2
- github.com/crossplane/crossplane-runtime (Go): affected from 0.6.0; fixed in 0.16.1
- github.com/crossplane/crossplane-runtime (Go): affected from 0.6.0; fixed in 0.16.1

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/CVE-2023-27483/ (Markdown: https://insights.sbomify.com/CVE-2023-27483/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-27483
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-27483
- OSV: https://osv.dev/vulnerability/CVE-2023-27483

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-27483/
Summaries are generated and may contain mistakes; the official description above is the record.
