GHSA-v782-xr4w-3vqx CVE-2024-31464
XWiki Platform: Password hash might be leaked by diff once the xobject holding them is deleted
- Severity
- 6.8 / 10
- Medium · CVSS 3.1
- Exploit chance (EPSS)
- 0.38%
- Chance of exploitation in the next 30 days. Higher than 31.61% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
- CWE-916 Use of Password Hash With Insufficient Computational Effort
- Fix
14.10.19- Upgrade org.xwiki.platform:xwiki-platform-oldcore to this version or later
Description
Impact
It is possible to access the hash of a password by using the diff feature of the history whenever the object storing the password is deleted. Using that vulnerability it's possible for an attacker to have access to the hash password of a user if they have rights to edit the users' page.
Now with the default right scheme in XWiki this vulnerability is normally prevented on user profiles, except by users with Admin rights. Note that this vulnerability also impacts any extensions that might use passwords stored in xobjects: for those usecases it depends on the right of those pages.
There is currently no way to be 100% sure that this vulnerability has been exploited, as an attacker with enough privilege could have deleted the revision where the xobject was deleted after rolling-back the deletion. But again, this operation requires high privileges on the target page (Admin right). A page with a user password xobject which have in its history a revision where the object has been deleted should be considered at risk and the password should be changed there.
Patches
The vulnerability has been patched in XWiki 14.10.19, 15.5.4 and 15.9-rc-1 by performing a better check before dislaying data of a diff, to ensure it's not coming from a password field.
Workarounds
Admins should ensure that the user pages are properly protected: the edit right shouldn't be allowed for other users than Admin and owner of the profile (which is the default right). Now there's not much workaround possible for a privileged user other than upgrading XWiki.
References
- JIRA ticket: https://jira.xwiki.org/browse/XWIKI-19948
- Commit: https://github.com/xwiki/xwiki-platform/commit/f1eaec1e512220fabd970d053c627e435a1652cf
For more information
If you have any questions or comments about this advisory:
- Open an issue in Jira XWiki.org
- Email us at Security Mailing List
Affected versions
Maven
| Package | Vulnerable | Fixed in |
|---|---|---|
| org.xwiki.platform:xwiki-platform-oldcore | >= 5.0-rc-1, < 14.10.19 |
14.10.19 |
| org.xwiki.platform:xwiki-platform-oldcore | >= 15.0-rc-1, < 15.5.4 |
15.5.4 |
| org.xwiki.platform:xwiki-platform-oldcore | >= 15.6-rc-1, < 15.9-rc-1 |
15.9-rc-1 |
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.19
- maven
<dependency><groupId>org.xwiki.platform</groupId><artifactId>xwiki-platform-oldcore</artifactId><version>14.10.19</version></dependency>- gradle
implementation("org.xwiki.platform:xwiki-platform-oldcore:14.10.19")
Severity breakdown
CVSS 3.1 6.8
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- High
- User interaction
- None
- Scope
- Changed
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Weakness
CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
How to prevent it
- Architecture and Design: Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.
CWE-916: Use of Password Hash With Insufficient Computational Effort
The product generates a hash for a password, but it uses a scheme that does not provide a sufficient level of computational effort that would make password cracking attacks infeasible or expensive.
How to prevent it
- Architecture and Design: Use an adaptive hash function that can be configured to change the amount of computational effort needed to compute the hash, such as the number of iterations ("stretching") or the amount of memory required. Some hash functions perform salting automatically. These functions can significantly increase the overhead for a brute force attack compared to intentionally-fast functions such as MD5. For example, rainbow table attacks can become infeasible due to the high computing overhead. Finally, since computing power gets faster and cheaper over time, the technique can be reconfigured to increase the workload without forcing an entire replacement of the algorithm in use. Some hash functions that have one or more of these desired properties include bcrypt [REF-291], scrypt [REF-292], and PBKDF2 [REF-293]. While there is active debate about which of these is the most effective, they are all stronger than using salts with hash functions with very little computing overhead. Note that using these functions can have an impact on performance, so they require special consideration to avoid denial-of-service attacks. However, their configurability provides finer control over how much CPU and memory is used, so it could be adjusted to suit the environment's needs.
- Implementation, Architecture and Design: When using industry-approved techniques, use them correctly. Don't cut corners by skipping resource-intensive steps (CWE-325). These steps are often essential for preventing common attacks.
References
Advisories
Packages
Other links
- github.com/xwiki/xwiki-platform/security/advisories/GHSA-v782-xr4w-3vqx
- github.com/xwiki/xwiki-platform/commit/9075668a4135cce114ef2a4b72eba3161a9e94c4
- github.com/xwiki/xwiki-platform/commit/955fb097e02a2a7153f527522ee9eef42447e5d7
- github.com/xwiki/xwiki-platform/commit/f1eaec1e512220fabd970d053c627e435a1652cf
- jira.xwiki.org/browse/XWIKI-19948
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