Krytyczna

org.xwiki.platform:xwiki-platform-rest-server allows SQL injection in query endpoint of REST API

  • Ujawniono: 23.04.2025
  • Aktualizacja: 11.10.2026 12:21

Impact

It is possible for a remote unauthenticated user to escape from the HQL execution context and perform a blind SQL injection to execute arbitrary SQL statements on the database backend, including when "Prevent unregistered users from viewing pages, regardless of the page rights" and "Prevent unregistered users from editing pages, regardless of the page rights" options are enabled.

Depending on the used database backend, the attacker may be able to not only obtain confidential information such as password hashes from the database, but also execute UPDATE/INSERT/DELETE queries.

The vulnerability may be tested in a default installation of XWIki Standard Flavor, including using the official Docker containers.

An example query, which leads to SQL injection with MySQL/MariaDB backend is shown below:

time curl "http://127.0.0.1:8080/rest/wikis/xwiki/query?q=where%20doc.name=length('a')*org.apache.logging.log4j.util.Chars.SPACE%20or%201%3C%3E%271%5C%27%27%20union%20select%201,2,3,sleep(10)%20%23%27&type=hql&distinct=0"

When executed, the response from the server will come after a delay of 10 extra seconds, indicating successful execution of the injected SQL statement.

An example of a query for the PostgreSQL database backend is shown below:

bash
curl "https://127.0.0.1:8080/rest/wikis/xwiki/query?q=where%20%24%24='%24%24=concat(%20chr(%2061%20),(chr(%2039%20))%20)%20;select%201%20--%20comment'&type=hql&distinct=0"

Both requests employ database backend dependent techniques of breaking out of HQL query context, described, for example, here: https://www.sonarsource.com/blog/exploiting-hibernate-injections.

Patches

This has been patched in 16.10.1, 16.4.6 and 15.10.16.

Workarounds

There is no known workaround, other than upgrading XWiki.

References

https://jira.xwiki.org/browse/XWIKI-22691

For more information

If you have any questions or comments about this advisory:

Attribution

Sergey Anufrienko from Kaspersky ICS-CERT vulnerability research team reported this vulnerability.

Czego dotyczy

Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.

PlatformaPaczkaPodatne wersjePoprawka w wersji
Java / Kotlin (Maven) org.xwiki.platform:xwiki-platform-rest-server >= 1.8, < 15.10.16, >= 16.0.0-rc-1, < 16.4.6, >= 16.5.0-rc-1, < 16.10.1 15.10.16, 16.4.6, 16.10.1

Odnośniki

Ocena CVSS 9.8/10
Wektor CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Słabość (CWE)
CWE-89
Platforma
Java / Kotlin (Maven)
Paczka
org.xwiki.platform:xwiki-platform-rest-server
Ujawniono
23.04.2025
Aktualizacja
11.10.2026 12:21

Źródła i licencje

OSV / GitHub Advisory Database - GHSA-f69v-xrj8-rhxf - CC BY 4.0

Historia podatności: org.xwiki.platform:xwiki-platform-rest-server

Wszystkie opisane podatności tej paczki (Java / Kotlin (Maven)), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.

Wszystkie (11) w archiwum
Wszystkich wpisów
11
Pierwsza → ostatnia
11.2022 05.2026
Bez poprawki
0
Wykorzystywana w atakach
0

Rozkład istotności

  • Krytyczna 4
  • Wysoka 4
  • Średnia 3

Ujawnienia w latach

  1. 2022: 1
  2. 2023: 2
  3. 2024: 1
  4. 2025: 6
  5. 2026: 1
Istotność:
  1. Krytyczna CVE-2026-33137 >= 15.10.6, < 16.10.17, >= 17.0.0-rc-1, < 17.4.9, >= 17.5.0, < 17.10.3, >= 18.0.0-rc-1, < 18.1.0-rc-1 16.10.17, 17.4.9, 17.10.3, 18.1.0-rc-1
  2. Wysoka CVE-2025-66473 < 16.10.11, >= 17.0.0-rc-1, < 17.4.4, >= 17.5.0-rc-1, < 17.7.0-rc-1 16.10.11, 17.4.4, 17.7.0-rc-1
  3. Krytyczna CVE-2025-52472 >= 17.0.0-rc-1, < 17.4.2, >= 4.3-milestone-1, < 16.10.9 17.4.2, 16.10.9
  4. Wysoka CVE-2025-49584 >= 10.9, < 16.4.7, >= 16.5.0-rc-1, < 16.10.3, >= 17.0.0-rc-1, < 17.0.0 16.4.7, 16.10.3, 17.0.0
  5. org.xwiki.platform:xwiki-platform-rest-server allows SQL injection in query endpoint of REST API ten wpis
    Krytyczna · 9.8 CVE-2025-32969 >= 1.8, < 15.10.16, >= 16.0.0-rc-1, < 16.4.6, >= 16.5.0-rc-1, < 16.10.1 15.10.16, 16.4.6, 16.10.1
  6. Wysoka CVE-2025-29925 >= 1.9M1, < 15.10.14, >= 16.0.0-rc-1, < 16.4.6, >= 16.5.0-rc-1, < 16.10.0-rc-1 15.10.14, 16.4.6, 16.10.0-rc-1
  7. Krytyczna · 9.6 CVE-2023-37277 >= 1.8, < 14.10.8, >= 15.0-rc-1, < 15.2 14.10.8, 15.2
  8. Wysoka · 7.5 CVE-2023-35151 >= 7.3-milestone-1, < 14.4.8, >= 14.5, < 14.10.6, >= 15.0-rc-1, < 15.1 14.4.8, 14.10.6, 15.1

Dowiedz się, które podatności dotyczą Twojej aplikacji

Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.

Podłącz swoją aplikację
Newsletter DockRay

Bezpieczeństwo aplikacji w Twojej skrzynce

Najważniejsze podatności, konkretne zalecenia i praktyczne wskazówki dla Twoich aplikacji. Wybierz technologie i śledź to, co ma znaczenie dla Twojego projektu.

  • Codzienne zestawienie nowych podatności, także krytycznych.
  • Powiadomienia o ważnych aktualizacjach.
  • Praktyczne porady o bezpieczeństwie i monitoringu aplikacji.

Pozostaw puste, aby otrzymywać informacje o wszystkich technologiach.

Zapis jest bezpłatny. Wypiszesz się jednym kliknięciem w wiadomości.