{"id":"GHSA-prwh-7838-xf82","summary":"XWiki allows SQL injection in query endpoint of REST API with Oracle","details":"### Impact\n\nIt's possible to execute any SQL query in Oracle by using the function like [DBMS_XMLGEN or DBMS_XMLQUERY](https://docs.oracle.com/en/database/oracle/oracle-database/19/arpls/DBMS_XMLGEN.html).\n\nThe XWiki query validator does not sanitize functions that would be used in a simple `select` and Hibernate allows using any native function in an HQL query.\n\n### Patches\n\nThis has been patched in 16.10.2, 16.4.7 and 15.10.16.\n\n### Workarounds\n\nThere is no known workaround, other than upgrading XWiki.\n\n### References\n\nhttps://jira.xwiki.org/browse/XWIKI-22734\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [Jira XWiki.org](https://jira.xwiki.org/)\n* Email us at [Security Mailing List](mailto:security@xwiki.org)","aliases":["CVE-2024-56158"],"modified":"2026-02-03T03:02:46.256732Z","published":"2025-06-12T21:52:50Z","database_specific":{"github_reviewed_at":"2025-06-12T21:52:50Z","nvd_published_at":"2025-06-12T15:15:38Z","cwe_ids":["CWE-89"],"severity":"CRITICAL","github_reviewed":true},"references":[{"type":"WEB","url":"https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-prwh-7838-xf82"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-56158"},{"type":"WEB","url":"https://github.com/xwiki/xwiki-platform/commit/ce855aae38eefd8ee3fc86353d51ac03d6cb7f8d"},{"type":"PACKAGE","url":"https://github.com/xwiki/xwiki-platform"},{"type":"WEB","url":"https://jira.xwiki.org/browse/XWIKI-22734"}],"affected":[{"package":{"name":"org.xwiki.platform:xwiki-platform-oldcore","ecosystem":"Maven","purl":"pkg:maven/org.xwiki.platform/xwiki-platform-oldcore"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.0"},{"fixed":"15.10.16"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/06/GHSA-prwh-7838-xf82/GHSA-prwh-7838-xf82.json"}},{"package":{"name":"org.xwiki.platform:xwiki-platform-oldcore","ecosystem":"Maven","purl":"pkg:maven/org.xwiki.platform/xwiki-platform-oldcore"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"16.0.0-rc-1"},{"fixed":"16.4.7"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/06/GHSA-prwh-7838-xf82/GHSA-prwh-7838-xf82.json"}},{"package":{"name":"org.xwiki.platform:xwiki-platform-oldcore","ecosystem":"Maven","purl":"pkg:maven/org.xwiki.platform/xwiki-platform-oldcore"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"16.5.0-rc-1"},{"fixed":"16.10.2"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/06/GHSA-prwh-7838-xf82/GHSA-prwh-7838-xf82.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"}]}