MAL-2026-20313: Malicious code in testing1345py (PyPI)

Published Nov 20, 2026
·
Updated

--- -= Per source details. Do not edit below this line.=-

Source: amazon-inspector (dc04d3349dc599ea7ba9a0b603b2afb8ce99af579ba29280f087697aae959d3b) The sdist's setup.py overrides buildpy.run to call runinstalldemo(), which on Windows invokes testing1345.hello.fetch() during pip install. fetch() downloads https://raw.githubusercontent.com/misdry01/g/refs/heads/main/test.bat — a mutable branch on a personal GitHub account unrelated to any declared publisher — and executes it via cmd.exe with no hash or signature check. The custom bdistwheel writes testing1345boot.pth into the wheel root; after install, site.py loads that.pth on every interpreter start and imports testing1345boot, whose module-level runonce() calls the same fetch(), gated only by a /tmp marker. src/testing1345/init.py additionally re-exports fetch as a public API, so any caller of testing1345.fetch() runs whatever bytes the mutable URL currently serves. Whoever controls that GitHub repository therefore obtains arbitrary code execution on the installer's machine at install time and at every subsequent Python startup.

Source: kam193 (d31c34fe25baf82fd16f49fca26bbb491a517c6c41f93a5b9c3b112fe2194aa8) During installation, the package downloads and executes a script from a remote location. During analysis, the code was benign, but the package is clearly part of campaign which previously delivered a RAT

---

Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers.

Campaign: 2026-11-testing1345

Reasons (based on the campaign):

- The package overrides the install command in setup.py to execute malicious code during installation.

- Downloads and executes a remote malicious script.

- rat

Affected Software

1 affected component
pip/testing1345py=0.1.3, =0.1.4

Event History

Nov 20, 2026
Advisory Published
via OSV·07:30 PM
Data Sourced
via OSV·07:30 PM
DescriptionAffected Software

Frequently Asked Questions

1

Which systems are exposed during installation?

The described install-time execution path is specific to Windows: setup.py invokes testing1345.hello.fetch(), which downloads and executes a batch file through cmd.exe during pip install.

2

Can the package execute code after installation without an application importing it?

Yes. Its custom wheel writes a testing1345_boot.pth file that site.py loads on every Python interpreter startup, importing testing1345_boot and invoking the download-and-execute behavior. The stated gate is only a /tmp marker.

3

What does an attacker need to exploit this behavior?

Control of the referenced GitHub repository is sufficient. The package downloads a batch file from a mutable branch URL and executes it without a hash or signature check.

4

Could application code trigger execution directly?

Yes. The package re-exports fetch as testing1345.fetch(), and calling that public API executes whatever content is currently served by the mutable remote URL.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203