CVE-2025-2255

8.7 HIGH

📋 TL;DR

This vulnerability allows Cross-Site Scripting (XSS) attacks through error messages in GitLab's AppSec feature. Attackers can inject malicious scripts that execute in users' browsers when they view certain error messages. All GitLab EE/CE instances with AppSec enabled in affected versions are vulnerable.

💻 Affected Systems

Products:
  • GitLab EE
  • GitLab CE
Versions: 13.5.0 to 17.8.5, 17.9.0 to 17.9.2, 17.10.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects instances with AppSec feature enabled. Self-managed and GitLab.com instances are both affected.

📦 What is this software?

Gitlab by Gitlab

GitLab is a complete DevOps platform providing source code management, CI/CD pipelines, security scanning, container registry, and collaboration tools used by millions of developers and thousands of enterprises worldwide. As both a cloud-hosted SaaS offering (GitLab.com) and self-managed software, G...

Learn more about Gitlab →

Gitlab by Gitlab

GitLab is a complete DevOps platform providing source code management, CI/CD pipelines, security scanning, container registry, and collaboration tools used by millions of developers and thousands of enterprises worldwide. As both a cloud-hosted SaaS offering (GitLab.com) and self-managed software, G...

Learn more about Gitlab →

Gitlab by Gitlab

GitLab is a complete DevOps platform providing source code management, CI/CD pipelines, security scanning, container registry, and collaboration tools used by millions of developers and thousands of enterprises worldwide. As both a cloud-hosted SaaS offering (GitLab.com) and self-managed software, G...

Learn more about Gitlab →

Gitlab by Gitlab

GitLab is a complete DevOps platform providing source code management, CI/CD pipelines, security scanning, container registry, and collaboration tools used by millions of developers and thousands of enterprises worldwide. As both a cloud-hosted SaaS offering (GitLab.com) and self-managed software, G...

Learn more about Gitlab →

Gitlab by Gitlab

GitLab is a complete DevOps platform providing source code management, CI/CD pipelines, security scanning, container registry, and collaboration tools used by millions of developers and thousands of enterprises worldwide. As both a cloud-hosted SaaS offering (GitLab.com) and self-managed software, G...

Learn more about Gitlab →

Gitlab by Gitlab

GitLab is a complete DevOps platform providing source code management, CI/CD pipelines, security scanning, container registry, and collaboration tools used by millions of developers and thousands of enterprises worldwide. As both a cloud-hosted SaaS offering (GitLab.com) and self-managed software, G...

Learn more about Gitlab →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could steal session cookies, perform actions as authenticated users, redirect to malicious sites, or install malware on user systems through browser exploitation.

🟠

Likely Case

Session hijacking, credential theft, or unauthorized actions performed in the context of authenticated users who view malicious error messages.

🟢

If Mitigated

Limited impact if Content Security Policy (CSP) is properly configured and users have script blockers, though some XSS may still bypass these controls.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires ability to trigger specific error messages with malicious payloads. May require some authentication or specific conditions.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 17.8.6, 17.9.3, or 17.10.1

Vendor Advisory: https://gitlab.com/gitlab-org/gitlab/-/issues/524635

Restart Required: No

Instructions:

1. Backup your GitLab instance. 2. Update to patched version: 17.8.6, 17.9.3, or 17.10.1. 3. Verify update completed successfully. 4. Test AppSec functionality.

🔧 Temporary Workarounds

Disable AppSec Feature

all

Temporarily disable the AppSec feature to prevent exploitation while planning upgrade.

gitlab-rails runner "Feature.disable(:security_dashboard)"

🧯 If You Can't Patch

  • Implement strict Content Security Policy (CSP) headers to limit script execution
  • Use web application firewall (WAF) rules to block XSS payloads in error messages

🔍 How to Verify

Check if Vulnerable:

Check GitLab version via Admin Area or command line. If version falls in affected ranges and AppSec is enabled, instance is vulnerable.

Check Version:

sudo gitlab-rake gitlab:env:info | grep 'Version:'

Verify Fix Applied:

Confirm version is 17.8.6, 17.9.3, or 17.10.1 or higher. Test AppSec error message functionality.

📡 Detection & Monitoring

Log Indicators:

  • Unusual error messages containing script tags or JavaScript in AppSec logs
  • Multiple failed AppSec operations from single user

Network Indicators:

  • HTTP requests containing script payloads in error message parameters
  • Unexpected redirects from AppSec pages

SIEM Query:

source="gitlab" AND ("AppSec" OR "security_dashboard") AND ("error" OR "exception") AND ("script" OR "javascript" OR "onload" OR "onerror")

🔗 References

📤 Share & Export