GHSA-w7qv-268h-9h3f: Logging Redactor: PII data in str/repr of non primitive objects was not being redacted
Logging Redactor is a Python library designed to redact sensitive data in logs based on regex patterns and / or dictionary keys. Prior to 0.0.7, personally identifiable information returned by custom object str or repr methods is not redacted when such non-primitive objects are logged, causing sensitive values to appear in logs that are expected to mask them. This issue is fixed in version 0.0.7.
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Logging Redactorto a version that resolves this vulnerability.Fixed in 0.0.7
Event History
Frequently Asked Questions
Who is exposed to this issue?
Applications using Logging Redactor before version 0.0.7 are exposed if they log custom, non-primitive Python objects whose __str__ or __repr__ output contains personally identifiable information. The issue affects log redaction based on configured regex patterns or dictionary keys for those object representations.
What does an attacker need to exploit this vulnerability?
No authentication or user interaction is required according to the supplied vector. Exploitation requires sensitive data to be included in the string or representation returned by a custom object's __str__ or __repr__ method and for that object to be logged.
How can I remediate the issue?
Upgrade Logging Redactor to version 0.0.7, which fixes redaction of PII in __str__ and __repr__ output from non-primitive objects.
How can I determine whether logs may already contain exposed data?
Review logs generated while using a version before 0.0.7 for entries involving custom object instances. Check whether their rendered __str__ or __repr__ values include PII that should have matched configured redaction regexes or dictionary-key rules.