VAITP Dataset

← Back to the dataset

CVE-2026-63417

Logging Redactor 0.0.6 leaks PII from object __str__/__repr__ outputs.

  • CVSS 8.2
  • CWE-532
  • Information Leakage
  • Local

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.

CVSS base score
8.2
Published
2026-11-03
OWASP
A09 Security Logging and Monitoring Failures
Orthogonal defect classification
Checking
Code defect classification
Missing Check
Category
Information Leakage
Subcategory
Insecure Handling of Sensitive Data
Accessibility scope
Local
Impact
Information Disclosure
Affected component
Logging Redactor
Fixed by upgrading
Yes

Solution

Upgrade Logging Redactor to version 0.0.7 or later.

Vulnerable code sample

import logging
from logging_redactor import Redactor

# Setup logger with redaction
redactor = Redactor(patterns=[r'\b\d{3}-\d{2}-\d{4}\b'])  # redact SSN patterns
handler = logging.StreamHandler()
handler.setFormatter(redactor.get_formatter())
logger = logging.getLogger("app")
logger.setLevel(logging.INFO)
logger.addHandler(handler)

class User:
    def __init__(self, name, ssn):
        self.name = name
        self.ssn = ssn

    def __repr__(self):
        # VULNERABLE: __repr__ leaks SSN which redactor does not inspect
        return f"User(name={self.name}, ssn={self.ssn})"

def process():
    user = User("Alice", "123-45-6789")
    logger.info("Processing user: %s", user)  # redactor sees object, not its string

process()

Patched code sample

import logging
from logging_redactor import Redactor

# Setup logger with redaction
redactor = Redactor(patterns=[r'\b\d{3}-\d{2}-\d{4}\b'])  # redact SSN patterns
handler = logging.StreamHandler()
handler.setFormatter(redactor.get_formatter())
logger = logging.getLogger("app")
logger.setLevel(logging.INFO)
logger.addHandler(handler)

class User:
    def __init__(self, name, ssn):
        self.name = name
        self.ssn = ssn

    def __repr__(self):
        return f"User(name={self.name}, ssn={self.ssn})"

def process():
    user = User("Alice", "123-45-6789")
    # FIX: force redaction on string representation of object
    logger.info("Processing user: %s", redactor.redact(str(user)))

process()

Published fix

Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.

Cite this entry

@misc{vaitp:cve202663417,
  title        = {{Logging Redactor 0.0.6 leaks PII from object __str__/__repr__ outputs.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-63417},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-63417/}}
}

Download this entry as JSON Download the whole dataset

Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.