VYPR
High severityNVD Advisory· Published May 28, 2021· Updated Aug 3, 2024

Users registered with email verification can self re-activate their disabled accounts

CVE-2021-32620

Description

XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. In versions prior to 11.10.13, 12.6.7, and 12.10.2, a user disabled on a wiki using email verification for registration canouldre-activate themself by using the activation link provided for his registration. The problem has been patched in the following versions of XWiki: 11.10.13, 12.6.7, 12.10.2, 13.0. It is possible to workaround the issue by resetting the validkey property of the disabled XWiki users. This can be done by editing the user profile with object editor.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
org.xwiki.commons:xwiki-commons-coreMaven
>= 11.6, < 11.10.1311.10.13
org.xwiki.commons:xwiki-commons-coreMaven
>= 12.0, < 12.6.712.6.7
org.xwiki.commons:xwiki-commons-coreMaven
>= 12.10.0, < 12.10.212.10.2

Affected products

1

Patches

1
f9a677408ffb

XWIKI-17942: Email validation check is not properly reset

https://github.com/xwiki/xwiki-platformSimon UrliDec 16, 2020via ghsa
2 files changed · +7 1
  • xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java+5 1 modified
    @@ -3857,10 +3857,14 @@ public int validateUser(boolean withConfirmEmail, XWikiContext context) throws X
     
                 // Compare the two keys
                 if ((!storedKey.equals("") && (storedKey.equals(validationKey)))) {
    +                // Ensure to remove the validation key value, so it cannot be used afterwards to enable back
    +                // a disabled user.
    +                userObject.setStringValue("validkey", "");
    +                saveDocument(userDocument, context);
    +
                     XWikiUser xWikiUser = new XWikiUser(userDocument.getDocumentReference());
                     xWikiUser.setDisabled(false, context);
                     xWikiUser.setEmailChecked(true, context);
    -                saveDocument(userDocument, context);
     
                     if (withConfirmEmail) {
                         String email = userObject.getStringValue("email");
    
  • xwiki-platform-core/xwiki-platform-oldcore/src/test/java/com/xpn/xwiki/XWikiTest.java+2 0 modified
    @@ -580,6 +580,8 @@ public void testValidationKeyStorage() throws Exception
             this.xwiki.saveDocument(testUser, context);
     
             assertEquals(0, this.xwiki.validateUser(false, this.oldcore.getXWikiContext()));
    +        XWikiDocument reloadedDocument = this.xwiki.getDocument(testUser, context);
    +        assertEquals("", reloadedDocument.getObject("XWiki.XWikiUsers").getStringValue("validkey"));
     
             // Check with an incorrect plaintext key
             validationKey.setValue("wrong key");
    

Vulnerability mechanics

Synthesis attempt was rejected by the grounding validator. Re-run pending.

References

5

News mentions

0

No linked articles in our index yet.