Skip to content

Graylog vulnerable to insecure source port usage for DNS queries

Low severity GitHub Reviewed Published Jul 5, 2023 in Graylog2/graylog2-server • Updated Nov 6, 2023

Package

maven org.graylog2:graylog2-server (Maven)

Affected versions

>= 5.1.0, < 5.1.3
< 5.0.9

Patched versions

5.1.3
5.0.9

Description

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

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)

References

@bernd bernd published to Graylog2/graylog2-server Jul 5, 2023
Published to the GitHub Advisory Database Jul 6, 2023
Reviewed Jul 6, 2023
Published by the National Vulnerability Database Aug 31, 2023
Last updated Nov 6, 2023

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N

EPSS score

0.078%
(34th percentile)

Weaknesses

CVE ID

CVE-2023-41045

GHSA ID

GHSA-g96c-x7rh-99r3

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.