Skip to content

GHSA-g96c-x7rh-99r3 CVE-2023-41045

Graylog vulnerable to insecure source port usage for DNS queries

Medium Maven
Severity
3.7 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
0.36%
Chance of exploitation in the next 30 days. Higher than 29.57% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-345 Insufficient Verification of Data Authenticity
Fix
5.1.3
Upgrade org.graylog2:graylog2-server to this version or later

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)

Affected versions

Maven

PackageVulnerableFixed in
org.graylog2:graylog2-server
>= 5.1.0, < 5.1.3
5.1.3
org.graylog2:graylog2-server
< 5.0.9
5.0.9

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

org.graylog2:graylog2-server Maven → 5.1.3

maven
<dependency><groupId>org.graylog2</groupId><artifactId>graylog2-server</artifactId><version>5.1.3</version></dependency>
gradle
implementation("org.graylog2:graylog2-server:5.1.3")

Severity breakdown

CVSS 3.1 3.7

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N

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

Weakness

CWE-345: Insufficient Verification of Data Authenticity

The product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-m9c2-85gv-8xr5
Graylog: Manager-to-Owner privilege escalation on saved searches and dashboards
Medium Also affects org.graylog2:graylog2-server
GHSA-j769-9gv9-65gr
Graylog token revocation endpoint allows authenticated users to delete other users’ access tokens
Medium Also affects org.graylog2:graylog2-server
GHSA-gqr6-r77p-c2pj
Fortigate syslog message parser can be exploited to modify or delete fields from the original message
High Also affects org.graylog2:graylog2-server
GHSA-q79r-r9xg-r863
Graylog Server: System Catalog titles endpoint can be used to retrieve values of protected database fields
Medium Also affects org.graylog2:graylog2-server
GHSA-3m86-c9x3-vwm9
Graylog vulnerable to privilege escalation through API tokens
High Also affects org.graylog2:graylog2-server
GHSA-76vf-mpmx-777j
Graylog Allows Session Takeover via Insufficient HTML Sanitization
Medium Also affects org.graylog2:graylog2-server
GHSA-q9q2-3ppx-mwqf
Graylog Allows Stored Cross-Site Scripting via Files Plugin and API Browser
High Also affects org.graylog2:graylog2-server
GHSA-q7g5-jq6p-6wvx
Graylog's Authenticated HTTP inputs ingest message even if Authorization header is missing or has wrong value
Medium Also affects org.graylog2:graylog2-server
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor