Skip to content

GHSA-w4fj-87j5-f25c CVE-2026-40105

XWiki has Reflected Cross-Site Scripting (XSS) in page history compare

Medium Maven
Severity
0.0 / 10
Medium · CVSS 4.0
Exploit chance (EPSS)
0.55%
Chance of exploitation in the next 30 days. Higher than 45.96% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-80 Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)
Fix
16.10.16
Upgrade org.xwiki.platform:xwiki-platform-web-templates to this version or later

Description

Impact

A reflected cross-site scripting vulnerability (XSS) in the compare view between revisions of a page allows executing JavaScript code in the user's browser. If the current user is an admin, this can not only affect the current user but also the confidentiality, integrity and availability of the whole XWiki instance.

Patches

The problem has been patched by properly escaping the URL parameters.

Workarounds

The patch can be applied manually to templates/changesdoc.vm in the deployed WAR.

Attribution

XWiki thanks Mike Cole @mikecole-mg for discovering and reporting this vulnerability.

Affected versions

Maven

PackageVulnerableFixed in
org.xwiki.platform:xwiki-platform-web-templates
>= 10.4-rc-1, < 16.10.16
16.10.16
org.xwiki.platform:xwiki-platform-web-templates
>= 17.0.0-rc-1, < 17.4.8
17.4.8
org.xwiki.platform:xwiki-platform-web-templates
>= 17.5.0-rc-1, < 17.10.1
17.10.1

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.xwiki.platform:xwiki-platform-web-templates Maven → 16.10.16

maven
<dependency><groupId>org.xwiki.platform</groupId><artifactId>xwiki-platform-web-templates</artifactId><version>16.10.16</version></dependency>
gradle
implementation("org.xwiki.platform:xwiki-platform-web-templates:16.10.16")

Severity breakdown

CVSS 4.0 0.0

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H

Attack vector
Network
Attack complexity
Low
Attack requirements
None
Privileges required
None
User interaction
Passive
Confidentiality (vulnerable system)
None
Integrity (vulnerable system)
None
Availability (vulnerable system)
None
Confidentiality (subsequent systems)
High
Integrity (subsequent systems)
High
Availability (subsequent systems)
High

CVSS 3.1 6.1

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Weakness

CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)

The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as "<", ">", and "&" that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages.

How to prevent it
  • Implementation: Carefully check each input parameter against a rigorous positive specification (allowlist) defining the specific characters and format allowed. All input should be neutralized, not just parameters that the user is supposed to specify, but all data in the request, including hidden fields, cookies, headers, the URL itself, and so forth. A common mistake that leads to continuing XSS vulnerabilities is to validate only fields that are expected to be redisplayed by the site. We often encounter data from the request that is reflected by the application server or the application that the development team did not anticipate. Also, a field that is not currently reflected may be used by a future developer. Therefore, validating ALL parts of the HTTP request is recommended.
  • Implementation: Use and specify an output encoding that can be handled by the downstream component that is reading the output. Common encodings include ISO-8859-1, UTF-7, and UTF-8. When an encoding is not specified, a downstream component may choose a different encoding, either by assuming a default encoding or automatically inferring which encoding is being used, which can be erroneous. When the encodings are inconsistent, the downstream component might treat some character or byte sequences as special, even if they are not special in the original encoding. Attackers might then be able to exploit this discrepancy and conduct injection attacks; they even might be able to bypass protection mechanisms that assume the original encoding is also being used by the downstream component. The problem of inconsistent output encodings often arises in web pages. If an encoding is not specified in an HTTP header, web browsers often guess about which encoding is being used. This can open up the browser to subtle XSS attacks.
  • Implementation: With Struts, write all data from form beans with the bean's filter attribute set to true.
  • Implementation: To help mitigate XSS attacks against the user's session cookie, set the session cookie to be HttpOnly. In browsers that support the HttpOnly feature (such as more recent versions of Internet Explorer and Firefox), this attribute can prevent the user's session cookie from being accessible to malicious client-side scripts that use document.cookie. This is not a complete solution, since HttpOnly is not supported by all browsers. More importantly, XmlHttpRequest and other powerful browser technologies provide read access to HTTP headers, including the Set-Cookie header in which the HttpOnly flag is set.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-wvqx-m5px-6cmp
XWiki Affected by Reflected Cross-Site Scripting (XSS) in Error Messages
Medium Also affects org.xwiki.platform:xwiki-platform-web-templates
GHSA-7vpr-jm38-wr7w
XWiki vulnerable to a reflected XSS via xredirect parameter in DeleteApplication
Medium Also affects org.xwiki.platform:xwiki-platform-web-templates
GHSA-m9x4-w7p9-mxhx
XWiki allows Reflected XSS in two templates
Medium Also affects org.xwiki.platform:xwiki-platform-web-templates
GHSA-f963-4cq8-2gw7
In XWiki Platform, payloads stored in content is executed when a user with script/programming right edit them
High Also affects org.xwiki.platform:xwiki-platform-web-templates
GHSA-692v-783f-mg8x
XWiki Platform vulnerable to Cross-Site Scripting (XSS) through conflict resolution
Medium Also affects org.xwiki.platform:xwiki-platform-web-templates
GHSA-93gh-jgjj-r929
XWiki Platform vulnerable to XSS with edit right in the create document form for existing pages
Medium Also affects org.xwiki.platform:xwiki-platform-web-templates
GHSA-qcj9-gcpg-4w2w
XWiki Platform web templates vulnerable to reflected XSS in the create document form if name validation is enabled
Critical Also affects org.xwiki.platform:xwiki-platform-web-templates
GHSA-ghf6-2f42-mjh9
XWiki users can be tricked to execute scripts as the create page action doesn't display the page's title
High Also affects org.xwiki.platform:xwiki-platform-web-templates
Is this in your code?

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