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

Medium 5.9 Published Updated

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

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

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, CWE-20

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.

PackageAffectedFixed in
github.com/crossplane/crossplane-runtime GoFrom 0.17.00.19.2
github.com/crossplane/crossplane-runtime GoFrom 0.17.00.19.2
github.com/crossplane/crossplane-runtime GoFrom 0.6.00.16.1, 0.19.2
github.com/crossplane/crossplane-runtime GoFrom 0.6.00.16.1
github.com/crossplane/crossplane-runtime GoFrom 0.6.00.16.1

Products include 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.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2023-27483 being exploited?

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

Sources

Also known as GHSA-vfvj-3m3g-m532, GO-2023-1623.

Is CVE-2023-27483 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free