CVE-2023-41045: Insecure source port usage for DNS queries in Graylog

Published Jul 6, 2023
·
Updated

Summary Graylog utilises only one single source port for DNS queries.

Details Graylog 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.

PoC

The 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 (CLIENTQUERY) are depicted in purple, while the queries sent from the recursive DNS server to the authoritatives (RESOLVERQUERY) 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.

!image

Impact Although 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.

(Credit to Iratxe Niño from Fundación Sarenet and Borja Marcos from Sarenet)

Other sources

Graylog is a free and open log management platform. Graylog makes use of only one single source port for DNS queries. Graylog binds a single socket for outgoing DNS queries and while that socket is bound to a random port number it is never 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. Although 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. This issue has been addressed in versions 5.0.9 and 5.1.3. Users are advised to upgrade. There are no known workarounds for this issue.

Affected Software

4 affected componentsFixes available
maven/org.graylog2:graylog2-server<5.0.9
5.0.9
maven/org.graylog2:graylog2-server>=5.1.0<5.1.3
5.1.3
Graylog Graylog<5.0.9
Graylog Graylog>=5.1.0<5.1.3

Event History

Jul 6, 2023
Advisory Published
08:51 PM
Aug 31, 2023
CVE Published
via MITRE·05:59 PM
Data Sourced
via MITRE·05:59 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What is CVE-2023-41045?

CVE-2023-41045 is a vulnerability in Graylog, a free and open log management platform, which binds a single socket for outgoing DNS queries and does not change the port number.

2

What is the severity of CVE-2023-41045?

CVE-2023-41045 has a severity value of 5.3, which is considered medium.

3

How does CVE-2023-41045 affect Graylog?

CVE-2023-41045 affects Graylog versions up to 5.0.9 and versions from 5.1.0 to 5.1.3.

4

How can I fix CVE-2023-41045?

To fix CVE-2023-41045, it is recommended to update Graylog to version 5.0.9 or higher, or version 5.1.3 or higher.

5

Is there any additional information about CVE-2023-41045?

Yes, you can find additional information about CVE-2023-41045 in the references provided: [Reference 1](https://github.com/Graylog2/graylog2-server/commit/466af814523cffae9fbc7e77bab7472988f03c3e), [Reference 2](https://github.com/Graylog2/graylog2-server/commit/a101f4f12180fd3dfa7d3345188a099877a3c327), [Reference 3](https://github.com/Graylog2/graylog2-server/security/advisories/GHSA-g96c-x7rh-99r3).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203