Poisoned Pipeline / Techniques / T0285

T0285 · Defense Evasion · TA07 · observed in 1 incident(s)

Ship another distribution's import name

Open Source Security Artifact Security Code Security

A Python wheel can contain any top-level package it likes, whatever the
distribution is called. pip installs distributions side by side and does
not check whether two of them write the same files, so a package named
something else entirely can ship a copy of a popular library's import
package, overwrite the real library's files in site-packages, and leave
both distributions listed as installed.

In December 2026 the PyPI package pyparserdecode carried no pyparserdecode
module. Its wheels contained a top-level pyparsing package — a copy of the
real pyparsing 3.3.3 source, converted to Windows line endings — plus one
added directory, pyparsing/_internal/preview/. The package metadata copied
the real project's summary, its author's name and its project URLs, and
the version numbers followed the real project: the fake 3.3.3 matched the
real stable release of 20 September 2026, and the fake 3.3.4 reached PyPI
twelve hours after the real 3.3.4rc1. A block appended to the copied
__init__.py imports the added module and calls its bootstrap() on every
import.

The consequence is that the infection is not limited to the program that
installed the package. pyparsing is a dependency of libraries such as
matplotlib and httplib2, so any Python process in that environment that
imports it runs the loader, and because the loader keeps no marker file,
each new process downloads and starts the next stage again.

This is not T0129, where the distribution name is a near-miss of the
target's name: pyparserdecode does not resemble pyparsing and is not
meant to be typed by anyone. It is not T0120 dependency confusion, which
relies on a private name resolving to a public one, and not T0266, which
publishes a clean namesake to cover a git dependency. The masquerade is in
the files the wheel writes, not in the name it publishes under.

Where this idea came from

Public incident / advisory

From pyparserdecode 3.3.3 and 3.3.4 on PyPI in December 2026, whose wheels contained a top-level pyparsing package with one added directory and no module of their own, so every import of pyparsing in the environment ran the loader. Distinct from T0129 (a near-miss distribution name), T0120 (a private name resolving to a public one) and T0266 (a clean namesake published to cover a git dependency).

Mitigations

None linked yet.

Detections

None linked yet.

Observed in incidents (1)

References