GHSA-33gp-gmg3-hfpq CVE-2024-37898
XWiki Platform vulnerable to document deletion and overwrite from edit
- Severity
- 0.0 / 10
- Medium · CVSS 4.0
- Exploit chance (EPSS)
- 0.40%
- Chance of exploitation in the next 30 days. Higher than 34.05% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-862 Missing Authorization
- Fix
14.10.21- Upgrade org.xwiki.platform:xwiki-platform-oldcore to this version or later
Description
Impact
When a user has edit but not view right on a page in XWiki, that user can delete the page and replace it by a page with new content without having delete right. The previous version of the page is moved into the recycle bin and can be restored from there by an admin. As the user is recorded as deleter, the user would in theory also be able to view the deleted content, but this is not directly possible as rights of the previous version are transferred to the new page and thus the user still doesn't have view right on the page. From all we examined, it therefore doesn't seem to be possible to exploit this to gain any rights.
To reproduce, just replace view by edit in the URL of a page that you cannot view but edit and save. This should send the page to the recycle bin and replace it by an empty one if the XWiki installation is vulnerable. After the fix, an error is displayed when saving.
Patches
This has been patched in XWiki 14.10.21, 15.5.5 and 15.10.6 by cancelling save operations by users when a new document shall be saved despite the document's existing already.
Workarounds
We're not aware of any workarounds.
References
Affected versions
Maven
| Package | Vulnerable | Fixed in |
|---|---|---|
| org.xwiki.platform:xwiki-platform-oldcore | >= 13.10.4, < 14.10.21 |
14.10.21 |
| org.xwiki.platform:xwiki-platform-oldcore | >= 14.2, < 14.10.21 |
14.10.21 |
| org.xwiki.platform:xwiki-platform-oldcore | >= 15.0, < 15.5.5 |
15.5.5 |
| org.xwiki.platform:xwiki-platform-oldcore | >= 15.6-rc-1, < 15.10.6 |
15.10.6 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
org.xwiki.platform:xwiki-platform-oldcore Maven → 14.10.21
- maven
<dependency><groupId>org.xwiki.platform</groupId><artifactId>xwiki-platform-oldcore</artifactId><version>14.10.21</version></dependency>- gradle
implementation("org.xwiki.platform:xwiki-platform-oldcore:14.10.21")
Severity breakdown
CVSS 4.0 0.0
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
- Attack vector
- Network
- Attack complexity
- Low
- Attack requirements
- None
- Privileges required
- Low
- User interaction
- None
- Confidentiality (vulnerable system)
- None
- Integrity (vulnerable system)
- Low
- Availability (vulnerable system)
- None
- Confidentiality (subsequent systems)
- None
- Integrity (subsequent systems)
- None
- Availability (subsequent systems)
- None
CVSS 3.1 4.3
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- Low
- Availability
- None
Weakness
CWE-862: Missing Authorization
The product does not perform an authorization check when an actor attempts to access a resource or perform an action.
How to prevent it
- Architecture and Design: Divide the product into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully mapping roles with data and functionality. Use role-based access control (RBAC) [REF-229] to enforce the roles at the appropriate boundaries. Note that this approach may not protect against horizontal authorization, i.e., it will not protect a user from attacking others with the same role.
- Architecture and Design: Ensure that access control checks are performed related to the business logic. These checks may be different than the access control checks that are applied to more generic resources such as files, connections, processes, memory, and database records. For example, a database may restrict access for medical records to a specific database user, but each record might only be intended to be accessible to the patient and the patient's doctor [REF-7].
- Architecture and Design: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using authorization frameworks such as the JAAS Authorization Framework [REF-233] and the OWASP ESAPI Access Control feature [REF-45].
- Architecture and Design: For web applications, make sure that the access control mechanism is enforced correctly at the server side on every page. Users should not be able to access any unauthorized functionality or information by simply requesting direct access to that page. One way to do this is to ensure that all pages containing sensitive information are not cached, and that all such pages restrict access to requests that are accompanied by an active and authenticated session token associated with a user who has the required permissions to access that page.
- System Configuration, Installation: Use the access control capabilities of your operating system and server environment and define your access control lists accordingly. Use a "default deny" policy when defining these ACLs.
References
Advisories
Packages
Other links
- github.com/xwiki/xwiki-platform/security/advisories/GHSA-33gp-gmg3-hfpq
- github.com/xwiki/xwiki-platform/commit/0bc27d6ec63c8a505ff950e2d1792cb4f773c22e
- github.com/xwiki/xwiki-platform/commit/56f5d8aab7371d5ba891168f73890806551322c5
- github.com/xwiki/xwiki-platform/commit/c5efc1e519e710afdf3c5f40c0fcc300ad77149f
- github.com/xwiki/xwiki-platform/commit/e4968fe268e5644ffd9bfa4ef6257d2796446009
- jira.xwiki.org/browse/XWIKI-21553
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-qj4x-9g63-25g6 XWiki Platform Old Core: Resource path traversal via /skin/ action endpoint in Jetty 12+ | High | Also affects org.xwiki.platform:xwiki-platform-oldcore |
| GHSA-mrqg-xmgm-rc5g XWiki's REST APIs can list all pages/spaces, leading to unavailability | High | Also affects org.xwiki.platform:xwiki-platform-oldcore |
| GHSA-h259-74h5-4rh9 XWiki vulnerable to remote code execution with script right through unprotected Velocity scripting API | Critical | Also affects org.xwiki.platform:xwiki-platform-oldcore |
| GHSA-57q2-6cp4-9mq3 XWiki exposes passwords and emails stored in fields not named password/email in xml.vm | Medium | Also affects org.xwiki.platform:xwiki-platform-oldcore |
| GHSA-r38m-cgpg-qj69 XWiki leaks password hashes and other accessible password properties | Medium | Also affects org.xwiki.platform:xwiki-platform-oldcore |
| GHSA-p9qm-p942-q3w5 XWiki Platform vulnerable to SQL injection through XWiki#searchDocuments API | Critical | Also affects org.xwiki.platform:xwiki-platform-oldcore |
| GHSA-jp4x-w9cj-97q7 XWiki allows remote code execution through preview of XClass changes in AWM editor | High | Also affects org.xwiki.platform:xwiki-platform-oldcore |
| GHSA-prwh-7838-xf82 XWiki allows SQL injection in query endpoint of REST API with Oracle | Critical | Also affects org.xwiki.platform:xwiki-platform-oldcore |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor