CVE-2024-24824 graylog2-server vulnerable to instantiation of arbitrary classes triggered by API request

High 8.8 Published Updated

Authenticated attackers can execute arbitrary code or read files by triggering class instantiation via the cluster config API endpoint.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-24824?

CVE-2024-24824 is a high-severity code injection vulnerability in graylog2-server, published on 7 Feb 2024. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

Graylog is a free and open log management platform. Starting in version 2.0.0 and prior to versions 5.1.11 and 5.2.4, arbitrary classes can be loaded and instantiated using a HTTP PUT request to the `/api/system/cluster_config/` endpoint. Graylog's cluster config system uses fully qualified class names as config keys. To validate the existence of the requested class before using them, Graylog loads the class using the class loader. If a user with the appropriate permissions performs the request, arbitrary classes with 1-arg String constructors can be instantiated. This will execute arbitrary code that is run during class instantiation. In the specific use case of `java.io.File`, the behavior of the internal web-server stack will lead to information exposure by including the entire file content in the response to the REST request. Versions 5.1.11 and 5.2.4 contain a fix for this issue.

Weakness: CWE-863, CWE-284

Which versions are affected by CVE-2024-24824?

4 open source packages ship an affected version, including org.graylog2:graylog2-server. It affects 1 product.

PackageAffectedFixed in
org.graylog2:graylog2-server MavenFrom 2.0.05.1.11
org.graylog2:graylog2-server MavenFrom 2.0.05.1.11
org.graylog2:graylog2-server MavenFrom 5.2.0-alpha.15.2.4
org.graylog2:graylog2-server MavenFrom 5.2.0-alpha.15.2.4

Products include Graylog Graylog.

How do I fix CVE-2024-24824?

Upgrade org.graylog2:graylog2-server to a fixed version for your release line: 5.1.11 or 5.2.4.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2024-24824 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-24824 exists.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as GHSA-p6gg-5hf4-4rgj.

Is CVE-2024-24824 in your software?

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

Check your SBOMs for free