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

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.

Basic information

Type
reviewed
Severity
low
Advisory on GitHub
Open advisory ↗
Repository advisory
Open repository advisory ↗
Source code
Browse source ↗
Published (advisory)
2025-04-29 13:59:45 UTC
Updated
2025-04-30 17:29:23 UTC
GitHub reviewed
2025-04-29 13:59:45 UTC
NVD published
2025-04-30

EPSS Score

Score Percentile
0.09% 25.52%

CVSS Scores

Base score Version Severity Vector
3.8 3.1
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:L Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:H)
They need powerful rights—admin, root, or similar—before this pays off.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:L)
Might cause slowdowns, glitches, or partial disruption—not a full brick.

Identifiers

CWEs

CWE id Name
CWE-863 Incorrect Authorization

Affected packages (3)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
maven org.xwiki.platform:xwiki-platform-search-solr-api >= 4.5.1, < 15.10.13 15.10.13
maven org.xwiki.platform:xwiki-platform-search-solr-api >= 16.0.0-rc-1, < 16.4.4 16.4.4
maven org.xwiki.platform:xwiki-platform-search-solr-api >= 16.5.0-rc-1, < 16.8.0-rc-1 16.8.0-rc-1

References

cvelogic Threat Intelligence