PyPI

The ssh-decorate PyPI Supply Chain Attack

Updated 5 Oct 2026 · Incident date 6 May 2018

ssh-decorate 0.28 through 0.31 on PyPI stole the SSH credentials it handled and sent them to an outside website in May 2018.

In May 2018, attackers published ssh-decorate 0.28 through 0.31 on PyPI. The last good version is 0.27.

What happened

Attackers got into the developer's PyPI account and uploaded four backdoored versions.

  • The added code collected the SSH credentials that users passed to the library.
  • It sent them to http://ssh-decorate.cf/index.php over plain HTTP, so anyone on the network path can read them.
  • The developer changed his PyPI password.
  • He republished the package as ssh-decorator.
  • He removed the original from GitHub and PyPI.

A user found the problem in the week of 7 May 2018. It was announced on 8 May.

Affected versions

  • ssh-decorate 0.28, 0.29, 0.30 and 0.31.
  • Last good version: 0.27.

BleepingComputer and Security Affairs advise users of 0.28 through 0.31 to go back to 0.27 or use the new ssh-decorator package.

Indicators of compromise

  • URL: http://ssh-decorate.cf/index.php.
  • Package ssh-decorate at a version from 0.28 to 0.31 in a requirements file, a virtual environment or a Docker image.

How to check

Check the installed version in each environment.

pip show ssh-decorate

Search code and requirement files for the package.

grep -rn "ssh-decorate" requirements*.txt Pipfile* poetry.lock setup.py 2>/dev/null

What to do now

  1. Uninstall ssh-decorate from every environment. Go back to 0.27 or use ssh-decorator.
  2. If a bad version ran, treat every SSH password and key that the code used as stolen. Replace them.
  3. Check server logs for logins from unknown addresses after May 2018.
  4. Block ssh-decorate.cf and search proxy logs for it.

What Vigilance would show

These examples show an install hold and the corresponding owner report.

Example install message

Vigilance blocked `ssh-decorate` 0.28. This version is too new or changed in a way Vigilance must check first.

Example owner report

Bad update

ssh-decorate 0.28

A remote-login helper started copying the usernames, passwords and keys it handled and sending them to an outside website.

See what to do now.

No security team? See who reads the alert.

Frequently asked questions

Which versions have the backdoor?

Versions 0.28 through 0.31. Version 0.27 is the last good release.

Does the package still exist under the old name?

No. The developer removed it from GitHub and PyPI and republished it as ssh-decorator.

Sources

  1. bleepingcomputer.com/news/security/backdoored-python-library-caught-stealing-ssh-credentials/
  2. securityaffairs.com/72298/malware/ssh-decorator-backdoor.html

Send this page to the person who looks after AI at your company.

Email it

More supply chain attacks

All 172 attacks in the library · What is a supply chain attack? · How to prevent supply chain attacks

Check the next update before you install it

Vigilance compares the version you trust with the new one. It names the one file that gained a power the old version did not have.

Start the free 14-day trialBrowse the attack library