Armando found a backdoor loader in resion v22.0.1, a PyPI package published on October 20, 2026 that presents itself as a minimal HTML parser. Like the related webreader and mailreader packages, resion hides its payload in a compressed pickle stored as the package's default.config, which its dependency pafex unpickles as soon as resion is imported. The pickle's code is meant to decrypt a stage that installs a .pth startup hook and a downloader for an attacker-controlled JSON bin. Armando decrypted that stage and found that the operator encrypted it with the wrong key -- the hash value itself rather than the module name the code searches for -- so as published the final stage can never decrypt. The release is malicious by design even though this copy of the chain misfires. resion has recorded 276 downloads.
Key Findings
- Malicious version: v22.0.1, published 2026-10-20 11:03 UTC; resion has no other release
- Entry point: no install hook --
resion/core.py calls pafex.config.load_config(None) at module level, which unpickles the bundled default.config when resion is imported
- Targets: Linux and Windows developer machines (intended); the encrypted stage installs a persistent remote-code loader
- Evasion: payload stored as an xz-compressed pickle in a "config" file; next stage XOR-encrypted and gated on an MD5-matched module name; unpickling delegated to a separate package from a separate account; every malicious branch wrapped in
except: pass
- Detection: Text.Trojan.SupplyChain, Script-Python.Trojan.SupplyChain, Archive-ZIP.Trojan.SupplyChain, Archive-GZIP.Trojan.SupplyChain, Archive-TAR.Trojan.SupplyChain
Package Background
resion describes itself as "minimal tree-based HTML parsing with basic selectors." It was published on October 20, 2026 by the PyPI account hositel, which owns no other packages, and declares no source code repository. Its unusual version number, 22.0.1, gives a brand-new package the look of a mature project. It has 276 recorded downloads.
resion declares a single runtime dependency, pafex, published 21 minutes later by another single-package account, and uses pafex's configuration loader. Its HTML parsing code works; the malicious part is the configuration file it ships and the call that loads it.
Attack Analysis
Import-time execution through a companion loader. At the end of resion/core.py, a module-level block calls load_config(None) from pafex.config. pafex locates the default.config next to resion's modules by inspecting the caller's stack frame, checks its header, decompresses it and calls pickle.loads, validating the result only afterwards. Importing resion therefore runs the pickle.
A pickle that evaluates code. The 3,760-byte default.config is xz-compressed and holds a 6,683-byte pickle that calls builtins.eval on a base64-wrapped string. The evaluated code carries a 1,875-byte XOR-encrypted blob, hashes every loaded module name (doubled) with MD5, and, if one matches a stored digest, uses that module name as the key to decrypt and execute the blob.
The key that cannot work. The same construction in webreader and mailreader uses the matching module's name as the key. In resion, Armando recovered the plaintext by known-plaintext analysis and found that it had been encrypted with the 32-character hex digest string itself. Hashing that string the same way does not reproduce the digest, so no loaded module name can supply the right key: either nothing matches, or the blob is XORed with the wrong name and the resulting garbage fails silently inside except: pass. As published, the backdoor stage does not install.
What the stage was written to do. The decrypted stage writes a pywild package -- an __init__.py launcher and a __cached__.py stager -- and a pyc_abi3-cross.pth startup file containing import pywild into the user site-packages directory (the interpreter's site-packages on Windows), so the launcher would run at every Python start and survive uninstalling resion. The launcher locks /tmp/nt.t (%TEMP%\nt.t) and starts the stager detached; the stager downloads base64-encoded code from https://api.npoint.io/69f11497b6c48bb2b2c5/p and executes it -- in-process on Windows, and from an in-memory copy of the interpreter created with memfd_create on Linux. The design matches the working payload in webreader, with different file names and a different JSON bin.
Malicious Files
default.config (Text.Trojan.SupplyChain) is the payload: an xz-compressed pickle loaded at import via pafex.load_config that calls builtins.eval, which attempts to decrypt an XOR stage gated on an MD5-matched module name. The stage writes pywild/ and pyc_abi3-cross.pth persistence that fetches and executes code from an npoint JSON bin. Because the operator encrypted the stage with the hash string as the key, it does not decrypt at runtime.
core.py (Script-Python.Trojan.SupplyChain) is the import-time trigger: it calls pafex's load_config(None) at module import, which unpickles the package's malicious default.config.
METADATA (Text.Trojan.SupplyChain) and pyproject.toml (Text.Trojan.SupplyChain) are the manifests that ship the malicious content and declare the pafex dependency.
Recommendations
Developers and security teams should take the following steps:
- Identify exposure: Check whether resion v22.0.1 or pafex appears in your dependency tree, cached wheels or lock files.
- Remove the packages: Uninstall resion and pafex. Neither has a clean release.
- Check for persistence: Although the stage should not decrypt as published, verify that no
pyc_abi3-cross.pth file or pywild/ directory exists in the user site-packages directory and that no nt.t lock file exists in /tmp or %TEMP%.
- Inspect network logs: Look for requests to the JSON bin listed below, which would indicate a working variant of this payload.
- Scan your software supply chain: Use Spectra Assure Community to check whether packages in your environment have been flagged.
Indicators of Compromise
Malicious Files
| Filename | SHA256 | Detection |
|---|
| default.config | 2fd526b48d780dad89ed1ce09743e9f970cf221cf79847933a780e6cfd8942e8 | Text.Trojan.SupplyChain |
| core.py | 9bc84233332aace881becc6f5cc69dea18c0c8a8c78539086ae8930a0adf3d33 | Script-Python.Trojan.SupplyChain |
| METADATA | 54e249fdc09efcd8f0b31c9f5305117ac21ec675f79f67321b79e2357667025b | Text.Trojan.SupplyChain |
| pyproject.toml | b6033b1f6eb6efc5fe7648eed6715fad9a29dfc9b74a5910e6315f2d0dd73b17 | Text.Trojan.SupplyChain |
Network IOCs
| URL / IP | Purpose |
|---|
| https://api.npoint.io/69f11497b6c48bb2b2c5/p | Intended second-stage source; the encrypted stager would download base64-encoded Python from this JSON bin and execute it (unreachable as published because of the encryption-key error) |
Archive Hashes
| File | SHA256 |
|---|
| resion-22.0.1-py3-none-any.whl | 900d432fddb0d4dced107ab13b5aaefb329ba92d42bc1b407fe98590b39d5be0 |
| resion-22.0.1.tar.gz | 144e52ecb399cb6a149e5bf136cd91eceb1eaa18d3b01c11ff490cb1f7cc2957 |
| resion-22.0.1.tar | a07774b3b2982dccc2d70e684e1c7015e7c618fe1849649675908a3eb3873132 |