Please DO NOT open a public issue for security vulnerabilities.
If you have discovered a security issue in Loclean, please report it by emailing nxan2911@gmail.com (or link to your profile).
We will acknowledge your report within 48 hours.
Status: Unpatched vulnerability in transitive dependency
Affected Versions: protobuf <= 6.33.4
Patched Version: None (as of January 2025)
Severity: Medium (DoS via RecursionError)
A denial-of-service (DoS) vulnerability exists in google.protobuf.json_format.ParseDict() in Python, where the max_recursion_depth limit can be bypassed when parsing nested google.protobuf.Any messages. Due to missing recursion depth accounting inside the internal Any-handling logic, an attacker can supply deeply nested Any structures that bypass the intended recursion limit, eventually exhausting Python's recursion stack and causing a RecursionError.
- Direct Impact: None - Loclean does not use
google.protobuf.json_format.ParseDict()orgoogle.protobuf.Anymessages in its core codebase. - Indirect Impact: Low -
protobufis only present as a transitive dependency of the optionalcloudextra (viagoogle-generativeai). - Affected Users: Only users who install
loclean[cloud]orloclean[all]are affected.
-
Use C++ Implementation (Recommended): The vulnerability only affects the Pure-Python backend. The C++ implementation (default for PyPI wheels) is not affected. Ensure you're using the C++ implementation by setting:
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp -
Avoid Cloud Extra: If you don't need cloud API support, avoid installing the
cloudextra:# Instead of: pip install loclean[cloud] pip install loclean # Core library only
-
Input Validation: If you're using
google-generativeaidirectly, avoid parsing untrusted JSON/protobuf data from external sources.
We are monitoring upstream protobuf releases for a patch. Once a patched version is available, we will update dependencies accordingly.
Last Updated: January 24, 2025