Skip to content
GraylogGHSA-g96c-x7rh-99r3

Graylog vulnerable to insecure source port usage for DNS queries

Low3.7CVE-2023-41045 · Published Jul 6, 2023 · updated Feb 16, 2024

### 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 (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. ![image](https://user-images.githubusercontent.com/67056857/242301750-6a5a8d0d-fcd2-40d1-bbd4-73baa8279ed3.png) ##...

GitHub advisory

Affected versions

PackageAffectedFixed in
org.graylog2:graylog2-server
Maven
>= 5.1.0, < 5.1.35.1.3
< 5.0.95.0.9
Details and references

### 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 (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. ![image](https://user-images.githubusercontent.com/67056857/242301750-6a5a8d0d-fcd2-40d1-bbd4-73baa8279ed3.png) ### 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)

CVSS 3.1
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
Severity from
GitHub (reviewed advisory)
Weakness
CWE-345
Also known as
CVE-2023-41045

More Graylog advisories

All Graylog
Advisory
Graylog session fixation vulnerability through cookie injection
Medium5.7Feb 7, 2024
Graylog vulnerable to instantiation of arbitrary classes triggered by API request
High8.8Feb 7, 2024
Graylog server has partial path traversal vulnerability in Support Bundle feature
Low3.3Jul 6, 2023
Graylog user session is still usable after logout
Low2.6Jul 6, 2023
Cross-site Scripting in Graylog
Medium6.1May 14, 2022
Cross-site Scripting in Graylog Server
Medium6.1May 14, 2022

Critical advisories by email

Wednesdays: the week’s critical and high advisories in the AI and data stack, with the fixed versions. Only in weeks that have some.

Double opt-in. Unsubscribe any time.