Security
Headlines
HeadlinesLatestCVEs

Headline

CVE-2023-41050: Merge pull request from GHSA-8xv7-89vj-q48c · zopefoundation/AccessControl@6bc3269

AccessControl provides a general security framework for use in Zope. Python’s “format” functionality allows someone controlling the format string to “read” objects accessible (recursively) via attribute access and subscription from accessible objects. Those attribute accesses and subscriptions use Python’s full blown getattr and getitem, not the policy restricted AccessControl variants _getattr_ and _getitem_. This can lead to critical information disclosure. AccessControl already provides a safe variant for str.format and denies access to string.Formatter. However, str.format_map is still unsafe. Affected are all users who allow untrusted users to create AccessControl controlled Python code and execute it. A fix has been introduced in versions 4.4, 5.8 and 6.2. Users are advised to upgrade. There are no known workarounds for this vulnerability.

CVE
#vulnerability#auth

Expand Up @@ -202,3 +202,25 @@ def test_prevents_bad_unicode_formatting_key(self): self.assertRaises(Unauthorized, SafeFormatter(‘{0[1]}’).safe_format, folder)
def test_format_map(self): from AccessControl.safe_formatter import SafeFormatter
# Accessing basic Python types in a basic Python list is fine. foo = list([‘bar’]) self.assertEqual(SafeFormatter(‘{foo[0]}’) .safe_format_map(dict(foo=foo)), ‘bar’) # But for non-basic items or non-basic lists, we want run checks. folder = self._create_folder_with_mixed_contents() # We can get the public items just fine: self.assertEqual(SafeFormatter(‘{foo[0]}’) .safe_format_map(dict(foo=folder)), ‘<Item public1>’) self.assertEqual(SafeFormatter(‘{foo[2]}’) .safe_format_map(dict(foo=folder)), ‘<Item public2>’) # But not the private item: self.assertRaises(Unauthorized, SafeFormatter(‘{foo[1]}’).safe_format_map, dict(foo=folder))

Related news

GHSA-8xv7-89vj-q48c: Information disclosure in AccessControl

### Impact Python's "format" functionality allows someone controlling the format string to "read" objects accessible (recursively) via attribute access and subscription from accessible objects. Those attribute accesses and subscriptions use Python's full blown `getattr` and `getitem`, not the policy restricted `AccessControl` variants `_getattr_` and `_getitem_`. This can lead to critical information disclosure. `AccessControl` already provides a safe variant for `str.format` and denies access to `string.Formatter`. However, `str.format_map` is still unsafe. Affected are all users who allow untrusted users to create `AccessControl` controlled Python code and execute it. ### Patches A fix will be introduced in the versions 4.4, 5.8 and 6.2. ### Workarounds There are no workarounds. ### References https://github.com/zopefoundation/RestrictedPython/security/advisories/GHSA-xjw2-6jm9-rf67 describes the corresponding problem for `RestrictedPython`.

CVE: Latest News

CVE-2023-50976: Transactions API Authorization by oleiman · Pull Request #14969 · redpanda-data/redpanda