CVE-2021-21380 — xwiki-platform-ratings-api
HIGHCVE-2021-21380 is a high-severity (CVSS 8.8) SQL Injection vulnerability in org.xwiki.platform:xwiki-platform-ratings-api. 3 public exploit references exist, so weaponization risk is real. A fix is available for org.xwiki.platform:xwiki-platform-ratings-api — see the affected versions and patch details below.
Rating Script Service expose XWiki to SQL injection
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2021-21380 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 385,738 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
org.xwiki.platform:xwiki-platform-ratings-apiReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
Impact
This issue impacts only XWiki with the Ratings API installed. The Rating Script Service expose an API to perform SQL requests without escaping the from and where search arguments. This might lead to an SQL script injection quite easily for any user having Script rights on XWiki.
Patches
The problem has been patched in XWiki 12.9RC1.
Workarounds
The only workaround besides upgrading XWiki would be to uninstall the Ratings API in XWiki from the Extension Manager.
References
https://jira.xwiki.org/browse/XWIKI-17662
For more information
If you have any questions or comments about this advisory:
- Open an issue in Jira XWiki
- Email us at our security mailing list
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.xwiki.platform:xwiki-platform-ratings-api | all versions | 12.9org.xwiki.platform:xwiki-platform-ratings-api:12.9 |
Affected Products
xwikixwikiResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.xwiki.platform:xwiki-platform-ratings-api, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.xwiki.platform:xwiki-platform-ratings-api to 12.9 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-21380 is resolved across your whole dependency graph.
Workarounds
Until you can upgrade, make sure every query built from user input uses parameterised statements or a prepared-statement API rather than string concatenation, and reduce the database account's privileges so an injected query cannot read or alter data beyond what the feature needs.
Frequently Asked Questions
Is CVE-2021-21380 in your dependencies?
Find it across Maven, including transitive dependencies.