Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-58591

CVE-2026-58591: Colorbox_project Colorbox XSS Vulnerability

CVE-2026-58591 is a cross-site scripting flaw in Drupal Colorbox that enables attackers to inject malicious scripts into web pages. This article covers the technical details, affected versions, security impact, and mitigation.

Published:

CVE-2026-58591 Overview

CVE-2026-58591 is a Cross-Site Scripting (XSS) vulnerability in the Drupal Colorbox module. The flaw stems from improper neutralization of user-supplied input during web page generation, classified under [CWE-79]. Attackers with low-privilege access can inject malicious script content that executes in the context of other users' browsers when combined with user interaction. The vulnerability affects Colorbox versions from 0.0.0 up to 2.1.5 and version 2.2.0 running on Drupal sites.

Critical Impact

Authenticated attackers can inject client-side scripts that execute in other users' sessions, enabling session theft, phishing, and unauthorized actions across the affected Drupal site.

Affected Products

  • Drupal Colorbox module versions 0.0.0 through 2.1.5
  • Drupal Colorbox module version 2.2.0
  • Any Drupal site using the vulnerable Colorbox contributed module

Discovery Timeline

  • 2026-07-10 - CVE-2026-58591 published to NVD
  • 2026-07-14 - Last updated in NVD database

Technical Details for CVE-2026-58591

Vulnerability Analysis

The Colorbox module provides a jQuery-based lightbox plugin integration for Drupal, allowing content authors to display images and content in overlay windows. The module fails to properly neutralize input rendered into web pages, allowing script content to persist in output HTML. An authenticated attacker with permission to submit content processed by Colorbox can embed script payloads that execute when other users view or interact with the affected pages.

The scope change indicated by the CVSS vector shows the vulnerability crosses trust boundaries. Injected scripts execute under the Drupal site's origin, granting access to authenticated victims' session cookies and Document Object Model (DOM) content. User interaction is required, which typically means a victim must load or interact with a page containing the crafted payload.

Root Cause

The root cause is missing or insufficient output encoding when the Colorbox module renders user-controllable input into HTML contexts. Drupal's rendering pipeline expects contributed modules to sanitize untrusted input using APIs such as Html::escape() or the t() function with proper placeholder types. The affected Colorbox versions omit or misuse these safeguards, allowing raw markup to reach the browser.

Attack Vector

Exploitation occurs over the network against Drupal sites with the vulnerable Colorbox module enabled. An attacker requires low-privilege authenticated access, such as a role permitted to submit content or configure Colorbox-associated fields. The attacker stores a crafted payload containing JavaScript that later renders when a victim loads the affected page. Because the scope changes, the injected script can affect components beyond the vulnerable module, including administrative interfaces if an admin views the payload.

No verified exploit code is publicly available. See the Drupal Security Advisory for vendor-provided technical details.

Detection Methods for CVE-2026-58591

Indicators of Compromise

  • Unexpected <script> tags, event handlers such as onerror or onload, or javascript: URIs appearing in Colorbox-rendered content in the database.
  • Outbound requests from user browsers to unfamiliar domains after loading pages that embed Colorbox overlays.
  • Anomalous session activity or privilege changes originating from administrator accounts shortly after viewing content submitted by lower-privileged users.

Detection Strategies

  • Review Drupal watchdog and web server logs for requests to endpoints associated with Colorbox rendering that contain encoded script fragments.
  • Perform database queries against node, field_data_*, and configuration tables for HTML entities that decode to executable script content.
  • Run automated DOM-XSS scanners against pages that render Colorbox overlays to identify reflected or stored payloads.

Monitoring Recommendations

  • Enable Content Security Policy (CSP) reporting to capture inline script violations on Drupal pages that use Colorbox.
  • Monitor for creation or modification of content by low-privileged roles immediately followed by administrator page views.
  • Alert on installation or activation of Colorbox module versions matching the vulnerable ranges through configuration management tooling.

How to Mitigate CVE-2026-58591

Immediate Actions Required

  • Upgrade the Colorbox module to a fixed release as specified in the Drupal Security Advisory.
  • Audit content submitted by non-administrative roles for embedded script payloads and remove any suspicious entries.
  • Rotate session tokens and review administrator accounts for signs of compromise if the module has been exposed to untrusted authors.

Patch Information

Drupal has issued guidance under advisory SA-CONTRIB-2026-069. Site operators should update the Colorbox contributed module to a version released after 2.2.0 that addresses the improper neutralization issue. Refer to the Drupal Security Advisory for exact fixed version numbers and upgrade instructions. The EPSS score at publication is approximately 0.23%, indicating low near-term exploitation probability, but stored XSS in a widely deployed Drupal module warrants prompt patching.

Workarounds

  • Restrict the Drupal roles and permissions that can submit or configure content rendered by Colorbox until the module is upgraded.
  • Deploy a strict Content Security Policy that blocks inline scripts and restricts script sources to trusted origins.
  • Temporarily disable the Colorbox module on sites where an immediate upgrade is not feasible and untrusted content authors exist.
bash
# Update the Colorbox module using Composer and clear caches
composer update drupal/colorbox --with-dependencies
drush updatedb -y
drush cache:rebuild

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.