CVE-2023-41045: Graylog2 server Remote Code Execution Vulnerability
LOWCVE-2023-41045 is a LOW (CVSS 3.7) remote code execution vulnerability (CWE-345: Insufficient Verification of Data Authenticity) affecting Graylog2 server libraries in the Maven ecosystem. The issue involves graylog vulnerable to insecure source port usage for dns queries. Remediation is available by upgrading affected packages to version 5.1.3, 5.0.9.
CVE-2023-41045 at a Glance
Security Impact
CVSS: 3.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N).
How to Fix CVE-2023-41045
To remediate this vulnerability, upgrade all affected Graylog2 server dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.graylog2</groupId>
<artifactId>graylog2-server</artifactId>
<version>5.1.3</version>
</dependency>
<dependency>
<groupId>org.graylog2</groupId>
<artifactId>graylog2-server</artifactId>
<version>5.0.9</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.graylog2
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2023-41045, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.graylog2
Analyze the terminal output to locate any version of Graylog2 server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.1.3), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.graylog2 command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-345: Insufficient Verification of Data Authenticity, where the product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data. In Graylog2 server, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-41045 Affected Graylog2 server Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.graylog2:graylog2-server
|
Maven |
≥ 5.1.0
< 5.1.3
|
5.1.3
|
|
org.graylog2:graylog2-server
|
Maven |
< 5.0.9
|
5.0.9
|
References
Frequently Asked Questions
What is CVE-2023-41045?
Which Graylog2 server versions are affected?
What version fixes CVE-2023-41045?
Is graylog2-server affected?
What is the CVSS score of CVE-2023-41045?
What CWE is associated with CVE-2023-41045?
How can I check Maven dependencies for CVE-2023-41045?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g96c-x7rh-99r3",
"modified" : "2023-09-07T21:19:13Z",
"published" : "2023-07-06T20:51:48Z",
"aliases" : [ "CVE-2023-41045" ],
"summary" : "Graylog vulnerable to insecure source port usage for DNS queries",
"details" : "### Summary\nGraylog utilises only one single source port for DNS queries.\n\n### Details\nGraylog seems to bind a single socket for outgoing DNS queries. That socket is bound to a random port number which is not changed again. This goes against recommended practice since 2008, when Dan Kaminsky discovered how easy is to carry out DNS cache poisoning attacks. In order to prevent cache poisoning with spoofed DNS responses, it is necessary to maximise the uncertainty in the choice of a source port for a DNS query.\n\n\n### PoC \n\nThe attached figure shows the source ports distribution difference between Graylog configured to use a data adapter based on DNS queries and ISC Bind. The source port distribution of the DNS queries sent from Graylog to a recursive DNS name server running Bind (CLIENT_QUERY) are depicted in purple, while the queries sent from the recursive DNS server to the authoritatives (RESOLVER_QUERY) are plotted in green color. As it can be observed, in contrast to ISC Bind which presents a heterogeneous usage of source port, Graylog utilises a single source port.\n\n\n\n### Impact\nAlthough unlikely in many setups, an external attacker could inject forged DNS responses into a Graylog's lookup table cache. In order to prevent this, it is at least recommendable to distribute the DNS queries through a pool of distinct sockets, each of them with a random source port and renew them periodically.\n\n\n\n(Credit to Iratxe Niño from Fundación Sarenet and Borja Marcos from Sarenet)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.graylog2:graylog2-server"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.1.0"
}, {
"fixed" : "5.1.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.graylog2:graylog2-server"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.0.9"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Graylog2/graylog2-server/security/advisories/GHSA-g96c-x7rh-99r3"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-41045"
}, {
"type" : "WEB",
"url" : "https://github.com/Graylog2/graylog2-server/commit/466af814523cffae9fbc7e77bab7472988f03c3e"
}, {
"type" : "WEB",
"url" : "https://github.com/Graylog2/graylog2-server/commit/a101f4f12180fd3dfa7d3345188a099877a3c327"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Graylog2/graylog2-server"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-345" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2023-07-06T20:51:48Z",
"nvd_published_at" : "2023-08-31T18:15:09Z"
}
}