CVE-2026-104002
Fail-open in Powertools Lambda data masking may expose masked fields.
- CVSS 6.0
- CWE-390
- Information Leakage
- Remote
A fail-open error handling issue within the data masking utility of Powertools for AWS Lambda (Python) might allow actors to read sensitive field values that the application intended to mask. To remediate this issue, users should upgrade to version 3.35.0.
- CWE
- CWE-390
- CVSS base score
- 6.0
- Published
- 2026-10-01
- OWASP
- A02 Cryptographic Failures
- Orthogonal defect classification
- Checking
- Code defect classification
- Missing Check
- Category
- Information Leakage
- Subcategory
- Information Disclosure
- Accessibility scope
- Remote
- Impact
- Information Disclosure
- Affected component
- Powertools for AWS Lambda
- Fixed by upgrading
- Yes
Solution
Upgrade Powertools for AWS Lambda (Python) to version 3.35.0.
Vulnerable code sample
import json
from aws_lambda_powertools.utilities.data_masker import DataMasker
def mask_record(record: dict, fields_to_mask: list) -> dict:
"""
Masks sensitive fields in a JSON-serializable record using Powertools DataMasker.
"""
masker = DataMasker()
# VULNERABLE: fail-open returns original record on masking error, leaking data
try:
masked_record = masker.mask(record, fields_to_mask)
except Exception:
return record
return masked_recordPatched code sample
import json
from aws_lambda_powertools.utilities.data_masker import DataMasker
def mask_record(record: dict, fields_to_mask: list) -> dict:
"""
Masks sensitive fields in a JSON-serializable record using Powertools DataMasker.
"""
masker = DataMasker()
# FIX: propagate error instead of returning raw data to avoid leakage
try:
masked_record = masker.mask(record, fields_to_mask)
except Exception:
raise
return masked_recordCite this entry
@misc{vaitp:cve2026104002,
title = {{Fail-open in Powertools Lambda data masking may expose masked fields.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-104002},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-104002/}}
}
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 ::
