GHSA-5cxw-w2xg-2m8h: Fickling Fickling's `platform` Module Subprocess Invocation Vulnerability
MODERATEGHSA-5cxw-w2xg-2m8h is a MODERATE fickling's `platform` module subprocess invocation vulnerability (CWE-184: Incomplete List of Disallowed Inputs) affecting Fickling libraries in the PyPI ecosystem. The issue involves fickling's `platform` module subprocess invocation evades `check_safety()` with `likely_safe`. Remediation is available by upgrading affected packages to version 0.1.10.
GHSA-5cxw-w2xg-2m8h at a Glance
How to Fix GHSA-5cxw-w2xg-2m8h
To remediate this vulnerability, upgrade all affected Fickling dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install fickling>=0.1.10
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show fickling
How to Check if You Are Affected
To determine whether your Python environment is affected by GHSA-5cxw-w2xg-2m8h, inspect your installed packages using pip:
pip show fickling
Analyze the terminal output to locate any version of Fickling in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.10), your application is affected.
Note: The pip show fickling command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-184: Incomplete List of Disallowed Inputs, where the product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are not allowed by policy or otherwise require other action to neutralize before additional processing takes place, but the list is incomplete. In Fickling, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-5cxw-w2xg-2m8h Affected Fickling Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
fickling
|
PyPI |
< 0.1.10
|
0.1.10
|
References
Frequently Asked Questions
What is GHSA-5cxw-w2xg-2m8h?
Which Fickling versions are affected?
What version fixes GHSA-5cxw-w2xg-2m8h?
Is fickling affected?
What CWE is associated with GHSA-5cxw-w2xg-2m8h?
How can I check PyPI dependencies for GHSA-5cxw-w2xg-2m8h?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5cxw-w2xg-2m8h",
"modified" : "2026-03-13T20:58:10Z",
"published" : "2026-03-13T20:58:10Z",
"aliases" : [ ],
"summary" : "fickling's `platform` module subprocess invocation evades `check_safety()` with `LIKELY_SAFE`",
"details" : "# Our assessment\n\nWe added `platform` to the blocklist of unsafe modules (https://github.com/trailofbits/fickling/commit/351ed4d4242b447c0ffd550bb66b40695f3f9975). \n\nIt was not possible to inject extra arguments to `file` without first monkey-patching `platform._follow_symlinks` with the pickle, as it always returns an absolute path. We independently hardened it with https://github.com/trailofbits/fickling/commit/b9e690c5a57ee9cd341de947fc6151959f4ae359 to reduce the risk of obtaining direct module references while evading detection.\n\nhttps://github.com/python/cpython/blob/6d1e9ceed3e70ebc39953f5ad4f20702ffa32119/Lib/platform.py#L687-L695\n```python\ntarget = _follow_symlinks(target)\n# \"file\" output is locale dependent: force the usage of the C locale\n# to get deterministic behavior.\nenv = dict(os.environ, LC_ALL='C')\ntry:\n # -b: do not prepend filenames to output lines (brief mode)\n output = subprocess.check_output(['file', '-b', target],\n stderr=subprocess.DEVNULL,\n env=env)\n```\n\n# Original report\n\n## Summary\nA crafted pickle invoking `platform._syscmd_file`, `platform.architecture`, or `platform.libc_ver` passes `check_safety()` with `Severity.LIKELY_SAFE` and zero findings. During `fickling.loads()`, these functions invoke `subprocess.check_output` with attacker-controlled arguments or read arbitrary files from disk.\n\n**Clarification:** The subprocess call uses a list argument (`['file', '-b', target]`), not `shell=True`, so the attacker controls the file path argument to the `file` command, not the command itself. The impact is subprocess invocation with attacker-controlled arguments and information disclosure (file type probing), not arbitrary command injection.\n\n## Affected versions\n`<= 0.1.9` (verified on upstream HEAD as of 2026-03-04)\n\n## Non-duplication check against published Fickling GHSAs\nNo published advisory covers `platform` module false-negative bypass. This follows the same structural pattern as GHSA-5hwf-rc88-82xm (missing modules in `UNSAFE_IMPORTS`) but covers a distinct set of functions.\n\n## Root cause\n1. `platform` not in `UNSAFE_IMPORTS` denylist.\n2. `OvertlyBadEvals` skips calls imported from stdlib modules.\n3. `UnusedVariables` heuristic neutralized by making call result appear used (`SETITEMS` path).\n\n## Reproduction (clean upstream)\n```python\nfrom unittest.mock import patch\nimport fickling\nimport fickling.fickle as op\nfrom fickling.fickle import Pickled\nfrom fickling.analysis import check_safety\n\npickled = Pickled([\n op.Proto.create(4),\n op.ShortBinUnicode('platform'),\n op.ShortBinUnicode('_syscmd_file'),\n op.StackGlobal(),\n op.ShortBinUnicode('/etc/passwd'),\n op.TupleOne(),\n op.Reduce(),\n op.Memoize(),\n op.EmptyDict(),\n op.ShortBinUnicode('init'),\n op.ShortBinUnicode('x'),\n op.SetItem(),\n op.Mark(),\n op.ShortBinUnicode('trace'),\n op.BinGet(0),\n op.SetItems(),\n op.Stop(),\n])\n\nresults = check_safety(pickled)\nprint(results.severity.name, len(results.results)) # LIKELY_SAFE 0\n\nwith patch('subprocess.check_output', return_value=b'ASCII text') as mock_sub:\n fickling.loads(pickled.dumps())\n print('subprocess called?', mock_sub.called) # True\n print('args:', mock_sub.call_args[0]) # (['file', '-b', '/etc/passwd'],)\n```\n\nAdditional affected functions (same pattern):\n- `platform.architecture('/etc/passwd')` — calls `_syscmd_file` internally\n- `platform.libc_ver('/etc/passwd')` — opens and reads arbitrary file contents\n\n## Minimal patch diff\n```diff\n--- a/fickling/fickle.py\n+++ b/fickling/fickle.py\n@@\n+ \"platform\",\n```\n\n## Validation after patch\n- Same PoC flips to `LIKELY_OVERTLY_MALICIOUS`\n- `fickling.loads` raises `UnsafeFileError`\n- `subprocess.check_output` is not called\n\n## Impact\n- **False-negative verdict:** `check_safety()` returns `LIKELY_SAFE` with zero findings for a pickle that invokes a subprocess with attacker-controlled arguments.\n- **Subprocess invocation:** `platform._syscmd_file` calls `subprocess.check_output(['file', '-b', target])` where `target` is attacker-controlled. The `file` command reads file headers and returns type information, enabling file existence and type probing.\n- **File read:** `platform.libc_ver` opens and reads chunks of an attacker-specified file path.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "fickling"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.1.10"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.1.9"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/trailofbits/fickling/security/advisories/GHSA-5cxw-w2xg-2m8h"
}, {
"type" : "WEB",
"url" : "https://github.com/trailofbits/fickling/commit/351ed4d4242b447c0ffd550bb66b40695f3f9975"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/trailofbits/fickling"
}, {
"type" : "WEB",
"url" : "https://github.com/trailofbits/fickling/releases/tag/v0.1.10"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-184" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-13T20:58:10Z",
"nvd_published_at" : null
}
}