VYPR
Moderate severityNVD Advisory· Published Apr 10, 2024· Updated Aug 13, 2024

XWiki Platform: Password hash might be leaked by diff once the xobject holding them is deleted

CVE-2024-31464

Description

XWiki Platform is a generic wiki platform. Starting in version 5.0-rc-1 and prior to versions 14.10.19, 15.5.4, and 15.9-rc-1, 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. 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. a diff, to ensure it's not coming from a password field. As another mitigation, 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). There is not much workaround possible for a privileged user other than upgrading XWiki.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
org.xwiki.platform:xwiki-platform-oldcoreMaven
>= 5.0-rc-1, < 14.10.1914.10.19
org.xwiki.platform:xwiki-platform-oldcoreMaven
>= 15.0-rc-1, < 15.5.415.5.4
org.xwiki.platform:xwiki-platform-oldcoreMaven
>= 15.6-rc-1, < 15.9-rc-115.9-rc-1

Affected products

1

Patches

3
f1eaec1e5122

XWIKI-19948: Bad diff information when xobject is deleted (#2439)

https://github.com/xwiki/xwiki-platformSimon UrliOct 16, 2023via ghsa
2 files changed · +10 1
  • xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java+4 1 modified
    @@ -7131,7 +7131,10 @@ public List<List<ObjectDiff>> getObjectDiff(XWikiDocument fromDoc, XWikiDocument
                         List<ObjectDiff> dlist;
                         if (newObj == null) {
                             // The object was deleted.
    -                        dlist = new BaseObject().getDiff(originalObj, context);
    +                        newObj = new BaseObject();
    +                        // We want the xclass reference to be set so that it can resolve the xclass properties.
    +                        newObj.setXClassReference(originalObj.getXClassReference());
    +                        dlist = newObj.getDiff(originalObj, context);
                             ObjectDiff deleteMarker =
                                 new ObjectDiff(originalObj.getXClassReference(), originalObj.getNumber(),
                                     originalObj.getGuid(), ObjectDiff.ACTION_OBJECTREMOVED, "", "", "", "");
    
  • xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/BaseObject.java+6 0 modified
    @@ -308,6 +308,12 @@ public List<ObjectDiff> getDiff(Object oldEntity, XWikiContext context)
                 BaseProperty newProperty = (BaseProperty) this.getField(propertyName);
                 BaseProperty oldProperty = (BaseProperty) oldObject.getField(propertyName);
                 BaseClass bclass = getXClass(context);
    +            // Bulletproofing: in theory the BaseObject is defined with a xclass reference allowing to resolve it
    +            // however, it's possible that the reference is not set, in which case we might still find the info
    +            // in the old object.
    +            if (bclass == null) {
    +                bclass = oldObject.getXClass(context);
    +            }
                 PropertyClass pclass = (PropertyClass) ((bclass == null) ? null : bclass.getField(propertyName));
                 String propertyType = (pclass == null) ? "" : pclass.getClassType();
     
    
9075668a4135

XWIKI-19948: Bad diff information when xobject is deleted (#2439)

https://github.com/xwiki/xwiki-platformSimon UrliOct 16, 2023via ghsa
2 files changed · +10 1
  • xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java+4 1 modified
    @@ -7120,7 +7120,10 @@ public List<List<ObjectDiff>> getObjectDiff(XWikiDocument fromDoc, XWikiDocument
                         List<ObjectDiff> dlist;
                         if (newObj == null) {
                             // The object was deleted.
    -                        dlist = new BaseObject().getDiff(originalObj, context);
    +                        newObj = new BaseObject();
    +                        // We want the xclass reference to be set so that it can resolve the xclass properties.
    +                        newObj.setXClassReference(originalObj.getXClassReference());
    +                        dlist = newObj.getDiff(originalObj, context);
                             ObjectDiff deleteMarker =
                                 new ObjectDiff(originalObj.getXClassReference(), originalObj.getNumber(),
                                     originalObj.getGuid(), ObjectDiff.ACTION_OBJECTREMOVED, "", "", "", "");
    
  • xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/BaseObject.java+6 0 modified
    @@ -308,6 +308,12 @@ public List<ObjectDiff> getDiff(Object oldEntity, XWikiContext context)
                 BaseProperty newProperty = (BaseProperty) this.getField(propertyName);
                 BaseProperty oldProperty = (BaseProperty) oldObject.getField(propertyName);
                 BaseClass bclass = getXClass(context);
    +            // Bulletproofing: in theory the BaseObject is defined with a xclass reference allowing to resolve it
    +            // however, it's possible that the reference is not set, in which case we might still find the info
    +            // in the old object.
    +            if (bclass == null) {
    +                bclass = oldObject.getXClass(context);
    +            }
                 PropertyClass pclass = (PropertyClass) ((bclass == null) ? null : bclass.getField(propertyName));
                 String propertyType = (pclass == null) ? "" : pclass.getClassType();
     
    
955fb097e02a

XWIKI-19948: Bad diff information when xobject is deleted (#2439)

https://github.com/xwiki/xwiki-platformSimon UrliOct 16, 2023via ghsa
2 files changed · +10 1
  • xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java+4 1 modified
    @@ -7117,7 +7117,10 @@ public List<List<ObjectDiff>> getObjectDiff(XWikiDocument fromDoc, XWikiDocument
                         List<ObjectDiff> dlist;
                         if (newObj == null) {
                             // The object was deleted.
    -                        dlist = new BaseObject().getDiff(originalObj, context);
    +                        newObj = new BaseObject();
    +                        // We want the xclass reference to be set so that it can resolve the xclass properties.
    +                        newObj.setXClassReference(originalObj.getXClassReference());
    +                        dlist = newObj.getDiff(originalObj, context);
                             ObjectDiff deleteMarker =
                                 new ObjectDiff(originalObj.getXClassReference(), originalObj.getNumber(),
                                     originalObj.getGuid(), ObjectDiff.ACTION_OBJECTREMOVED, "", "", "", "");
    
  • xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/BaseObject.java+6 0 modified
    @@ -308,6 +308,12 @@ public List<ObjectDiff> getDiff(Object oldEntity, XWikiContext context)
                 BaseProperty newProperty = (BaseProperty) this.getField(propertyName);
                 BaseProperty oldProperty = (BaseProperty) oldObject.getField(propertyName);
                 BaseClass bclass = getXClass(context);
    +            // Bulletproofing: in theory the BaseObject is defined with a xclass reference allowing to resolve it
    +            // however, it's possible that the reference is not set, in which case we might still find the info
    +            // in the old object.
    +            if (bclass == null) {
    +                bclass = oldObject.getXClass(context);
    +            }
                 PropertyClass pclass = (PropertyClass) ((bclass == null) ? null : bclass.getField(propertyName));
                 String propertyType = (pclass == null) ? "" : pclass.getClassType();
     
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

7

News mentions

0

No linked articles in our index yet.