International
The Morning Dev

Only the news worth knowing

‹
 
A66/100

Malware · high

Running pytest executes conftest.py, enabling PolinRider malware

Tier A · Patch today – Before you go home

Who’s exposed: Developers running pytest in cloned or untrusted repositories

Tier A because: Core infrastructure or popular tool AND exploited in the wild

Reach

Attack

Damage

Fix

Popular tool · Exploited in the wild · Full takeover

What to do

  1. Review conftest.py in untrusted repositories before running pytest

The Brief

  • Running pytest executes conftest.py, even for pytest --help, according to the article.
  • A malware campaign called PolinRider relies on this behaviour.
  • The article warns that developers often run tests on cloned repos before reviewing them.

Why it matters

Running pytest on an untrusted repository can execute attacker-controlled code before any tests run, so simply cloning and running the test suite is not safe.

The checklist behind the tier

Checklist · 4 of 10 yes
YesHits tech teamsJudgment: pytest is a developer testing tool used by Python teams.
NoCore infrastructureJudgment: pytest is a widely used test framework, not software nearly every team runs like OpenSSH or GitHub.
YesPopular toolJudgment: pytest is a mainstream Python testing framework used by many teams.
YesExploited in the wildDEV Community: one malware campaign is now leaning on pytest running conftest.py.
NoPublic exploitDEV Community excerpt mentions no published exploit code or proof-of-concept.
NoRemote, no loginDEV Community: the attack triggers when a victim runs pytest on a cloned repo, requiring user action.
YesFull takeoverDEV Community: running pytest executes conftest.py, enabling PolinRider malware, implying code execution.
NoSecrets exposedDEV Community excerpt does not report any credentials or data being stolen.
NoSupply chainDEV Community excerpt does not say a legitimate project's package or pipeline was compromised.
NoNo fix yetDEV Community excerpt does not mention any patch or fix status.

Source

Even pytest --help Runs conftest.py. PolinRider Malware Counts on It ↗ DEV Community: python · 55 min ago

First seen · 1 source · Full story page · How tiers are decided