Описание
Fickling has missing detection for marshal.loads and types.FunctionType in unsafe modules list
Fickling Assessment
Based on the test case provided in the original report below, this bypass was caused by marshal and types missing from the block list of unsafe module imports, Fickling started blocking both modules to address this issue. This was fixed in https://github.com/trailofbits/fickling/pull/186. The crash is unrelated and has no security impact—it will be addressed separately.
Original report
Summary
There's missing detection for the python modules, marshal.loads and types.FunctionType and Fickling throws unhandled ValueErrors when the stack is deliberately exhausted.
Details
Fickling simply doesn't have the aforementioned modules in its list of unsafe imports and therefore it fails to get detected.
PoC
The following is a disassembled view of a malicious pickle file that uses these modules:
When analyzing this modified file, safety_result.json shows:
Furthermore, when we run fickling -s <path_to_malicious_file>, we also encounter this error:
Impact
This allows an attacker to craft a malicious pickle file that can bypass fickling since it misses detections for types.FunctionType and marshal.loads. A user who deserializes such a file, believing it to be safe, would inadvertently execute arbitrary code on their system. This impacts any user or system that uses Fickling to vet pickle files for security issues.
Ссылки
- https://github.com/trailofbits/fickling/security/advisories/GHSA-565g-hwwr-4pp3
- https://nvd.nist.gov/vuln/detail/CVE-2025-67747
- https://github.com/trailofbits/fickling/pull/186
- https://github.com/trailofbits/fickling/commit/4e34561301bda1450268d1d7b0b2b151de33b913
- https://github.com/trailofbits/fickling/releases/tag/v0.1.6
Пакеты
fickling
< 0.1.6
0.1.6
Связанные уязвимости
Fickling is a Python pickling decompiler and static analyzer. Versions prior to 0.1.6 are missing `marshal` and `types` from the block list of unsafe module imports. Fickling started blocking both modules to address this issue. This allows an attacker to craft a malicious pickle file that can bypass fickling since it misses detections for `types.FunctionType` and `marshal.loads`. A user who deserializes such a file, believing it to be safe, would inadvertently execute arbitrary code on their system. This impacts any user or system that uses Fickling to vet pickle files for security issues. The issue was fixed in version 0.1.6.