Skip to content

Solr script service doesn't take dropped programming right into account

Low
michitux published GHSA-987p-r3jc-8c8v Apr 29, 2025

Package

maven org.xwiki.platform:xwiki-platform-search-solr-api (Maven)

Affected versions

>= 4.5.1, < 15.10.13
>= 16.0.0-rc-1, < 16.4.4
>= 16.5.0-rc-1, < 16.8.0-rc-1

Patched versions

15.10.13
16.4.4
16.8.0-rc-1

Description

Impact

The Solr script service that is accessible in XWiki's scripting API normally requires programming right to be called. Due to using the wrong API for checking rights, it doesn't take the fact into account that programming rights might have been dropped by calling $xcontext.dropPermissions(). If some code relies on this for the safety of executing Velocity code with the wrong author context, this could allow a user with script right to either cause a high load by indexing documents or to temporarily remove documents from the search index. We're not aware that this is exploitable in XWiki itself.

To reproduce, a user with programming right can add the following XWiki syntax to a page:

{{velocity}}
$xcontext.dropPermissions()
$services.solr.index('document:xwiki:Main.WebHome')
{{/velocity}} 

This should trigger an error in XWiki's log, otherwise the installation is vulnerable.

Patches

This has been patched in XWiki 15.10.13, 16.8.0RC1, and 16.4.4.

Workarounds

We're not aware of any workarounds apart from being careful whom you grant script right.

References

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
High
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:L

CVE ID

CVE-2025-32971

Weaknesses