GitLab: Improper Encoding or Escaping of Output
CVE-2025-8405 is a high-severity improper encoding or escaping of output vulnerability in GitLab, with a CVSS 3.1 base score of 7.7 out of 10. It can be exploited remotely over the network by an attacker with a low-privileged account, but only if a user takes part, for example by opening a link or file. The record lists versions 18.4.6, 18.5.4, 18.6.2 as the first without the flaw, so updating GitLab to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.53% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update GitLab to 18.4.6 or 18.5.4 or 18.6.2, whichever matches your release line, or a later version.
- Read the advisory on about.gitlab.com for workarounds and exact fixed builds.
- Because the attack needs a user to take part, warn users about unexpected links and files related to this product until it is patched.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| GitLab | GitLab | 17.1 up to, but not including, 18.4.6; 18.5 up to, but not including, 18.5.4; 18.6 up to, but not including, 18.6.2 | 18.4.6, 18.5.4, 18.6.2 |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- HighSuccess depends on conditions outside the attacker's control.
- Privileges required
- LowA basic user account is enough.
- User interaction
- RequiredA user must take an action such as opening a file or link.
- Scope
- ChangedThe attack can reach beyond the vulnerable component into other systems.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- NoneAvailability is not affected.
Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N. Scored by CNA (gitlab.com).
Official description
GitLab has remediated a security issue in GitLab CE/EE affecting all versions from 17.1 before 18.4.6, 18.5 before 18.5.4, and 18.6 before 18.6.2 that could have allowed an authenticated user to perform unauthorized actions on behalf of other users by injecting malicious HTML into vulnerability code flow displays.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improper Encoding or Escaping of Output
The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.
How developers prevent this class of flaw
- Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using the ESAPI Encoding control or a similar tool, library, or framework. These will help the programmer encode outputs in a manner less prone to error. Alternately, use built-in functions, but consider using wrappers in case those functions are discovered to have a vulnerability.
- If available, use structured mechanisms that automatically enforce the separation between data and code. These mechanisms may be able to provide the relevant quoting, encoding, and validation automatically, instead of relying on the developer to provide this capability at every point where output is generated. For example, stored procedures can enforce database query structure and reduce the likelihood of SQL injection.
- Understand the context in which your data will be used and the encoding that will be expected. This is especially important when transmitting data between different components, or when generating outputs that can contain multiple encodings at the same time, such as web pages or multi-part mail messages. Study all expected communication protocols and data representations to determine the required encoding strategies.
More Improper Encoding or Escaping of Output vulnerabilities (CWE-116)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Advisories
Other references
- hackerone.com/reports/3270940Permissions Required
Other vulnerabilities in GitLab
- 7.1 High severity
- 8.2 High severity
- 7.5 High severity
- 10.0 Critical severity
- 10.0 Critical severity
- 7.3 High severity
Recent Improper Encoding or Escaping of Output vulnerabilities
- 9.1 Critical severity
- 8.6 High severity
- 8.1 High severity
- 9.4 Critical severity
- 10.0 Critical severity
- 10.0 Critical severity
Spotted an error? Tell us.