VYPR
Moderate severityNVD Advisory· Published Sep 10, 2012· Updated Apr 29, 2026

CVE-2012-4404

CVE-2012-4404

Description

security/__init__.py in MoinMoin 1.9 through 1.9.4 does not properly handle group names that contain virtual group names such as "All," "Known," or "Trusted," which allows remote authenticated users with virtual group membership to be treated as a member of the group.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
moinPyPI
>= 1.9, < 1.9.51.9.5

Affected products

5
  • Moinmo/Moinmoin5 versions
    cpe:2.3:a:moinmo:moinmoin:1.9.0:*:*:*:*:*:*:*+ 4 more
    • cpe:2.3:a:moinmo:moinmoin:1.9.0:*:*:*:*:*:*:*
    • cpe:2.3:a:moinmo:moinmoin:1.9.1:*:*:*:*:*:*:*
    • cpe:2.3:a:moinmo:moinmoin:1.9.2:*:*:*:*:*:*:*
    • cpe:2.3:a:moinmo:moinmoin:1.9.3:*:*:*:*:*:*:*
    • cpe:2.3:a:moinmo:moinmoin:1.9.4:*:*:*:*:*:*:*

Patches

1
b7791166cb36

security fix: fix virtual group bug in ACL evaluation, add a test for it

2 files changed · +49 2
  • MoinMoin/security/__init__.py+3 2 modified
    @@ -235,11 +235,12 @@ def may(self, name, dowhat):
                     handler = getattr(self, "_special_"+entry, None)
                     allowed = handler(name, dowhat, rightsdict)
                 elif entry in groups:
    -                if name in groups[entry]:
    +                this_group = groups[entry]
    +                if name in this_group:
                         allowed = rightsdict.get(dowhat)
                     else:
                         for special in self.special_users:
    -                        if special in entry:
    +                        if special in this_group:
                                 handler = getattr(self, "_special_" + special, None)
                                 allowed = handler(name, dowhat, rightsdict)
                                 break # order of self.special_users is important
    
  • MoinMoin/security/_tests/test_security.py+46 0 modified
    @@ -16,6 +16,7 @@
     
     from MoinMoin.user import User
     from MoinMoin.config import ACL
    +from MoinMoin.datastruct import ConfigGroups
     
     from MoinMoin._tests import update_item
     from MoinMoin._tests import become_trusted
    @@ -257,6 +258,51 @@ def testApplyACLByUser(self):
                     assert not acl.may(user, right)
     
     
    +class TestGroupACL(object):
    +
    +    from MoinMoin._tests import wikiconfig
    +    class Config(wikiconfig.Config):
    +        def groups(cfg):
    +            groups = {
    +                u'PGroup': frozenset([u'Antony', u'Beatrice', ]),
    +                u'AGroup': frozenset([u'All', ]),
    +                # note: the next line is a INTENDED misnomer, there is "All" in
    +                # the group NAME, but not in the group members. This makes
    +                # sure that a bug that erroneously checked "in groupname" (instead
    +                # of "in groupmembers") does not reappear.
    +                u'AllGroup': frozenset([]), # note: intended misnomer
    +            }
    +            return ConfigGroups(groups)
    +
    +    def testApplyACLByGroup(self):
    +        """ security: applying acl by group name"""
    +        # This acl string...
    +        acl_rights = [
    +            "PGroup,AllGroup:read,write,admin "
    +            "AGroup:read "
    +            ]
    +        acl = AccessControlList(acl_rights, valid=app.cfg.acl_rights_contents)
    +
    +        # Should apply these rights:
    +        users = (
    +            # user, rights
    +            ('Antony', ('read', 'write', 'admin', )),  # in PGroup
    +            ('Beatrice', ('read', 'write', 'admin', )),  # in PGroup
    +            ('Charles', ('read', )),  # virtually in AGroup
    +            )
    +
    +        # Check rights
    +        for user, may in users:
    +            mayNot = [right for right in app.cfg.acl_rights_contents
    +                      if right not in may]
    +            # User should have these rights...
    +            for right in may:
    +                assert acl.may(user, right)
    +            # But NOT these:
    +            for right in mayNot:
    +                assert not acl.may(user, right)
    +
    +
     class TestItemAcls(object):
         """ security: real-life access control list on items testing
         """
    

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

16

News mentions

0

No linked articles in our index yet.