GHSA-3xf8-g8gr-g7rh CVE-2024-24823
Graylog session fixation vulnerability through cookie injection
- Severity
- 5.7 / 10
- Medium · CVSS 3.1
- Exploit chance (EPSS)
- 0.41%
- Chance of exploitation in the next 30 days. Higher than 35.71% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-384 Session Fixation
- Fix
5.1.11- Upgrade org.graylog2:graylog2-server to this version or later
Description
Impact
Reauthenticating with an existing session cookie would re-use that session id, even if for different user credentials. In this case, the pre-existing session could be used to gain elevated access to an existing Graylog login session, provided the malicious user could successfully inject their session cookie into someone else's browser.
The complexity of such an attack is high, because it requires presenting a spoofed login screen and injection of a session cookie into an existing browser, potentially through an XSS attack. No such attack has been discovered.
Patches
Graylog 5.1.11 and 5.2.4, and any versions of the 6.0 development branch contain patches to not re-use sessions under any circumstances, making this type of attack impossible.
Workarounds
Using short session expiration and explicit log outs of unused sessions can help limiting the attack vector. Unpatched this vulnerability exists, but is relatively hard to exploit.
A proxy could be leveraged to clear the authentication cookie for the Graylog server URL for the /api/system/sessions endpoint, as that is the only one vulnerable.
Analysis provided by Fabian Yamaguchi - Whirly Labs (Pty) Ltd
Affected versions
Maven
| Package | Vulnerable | Fixed in |
|---|---|---|
| org.graylog2:graylog2-server | >= 4.3.0, < 5.1.11 |
5.1.11 |
| org.graylog2:graylog2-server | >= 5.2.0-alpha.1, < 5.2.4 |
5.2.4 |
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.11
- maven
<dependency><groupId>org.graylog2</groupId><artifactId>graylog2-server</artifactId><version>5.1.11</version></dependency>- gradle
implementation("org.graylog2:graylog2-server:5.1.11")
Severity breakdown
CVSS 3.1 5.7
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- High
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- None
Weakness
CWE-384: Session Fixation
Authenticating a user, or otherwise establishing a new user session, without invalidating any existing session identifier gives an attacker the opportunity to steal authenticated sessions.
How to prevent it
- Architecture and Design: Invalidate any existing session identifiers prior to authorizing a new user session.
- Architecture and Design: For platforms such as ASP that do not generate new values for sessionid cookies, utilize a secondary cookie. In this approach, set a secondary cookie on the user's browser to a random value and set a session variable to the same value. If the session variable and the cookie value ever don't match, invalidate the session, and force the user to log on again.
- Operation: Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth [REF-1481].
References
Advisories
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why 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 |
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