appsec.fyi

Python Resources

Post Share

A curated AppSec resource library covering XSS, SQLi, SSRF, IDOR, RCE, XXE, OSINT, and more.

Python

Python has become one of the most widely used languages in cybersecurity — from writing exploit scripts and automation tools to building security scanners and processing large datasets. Its readability, extensive standard library, and rich ecosystem of security-focused packages make it the go-to language for security professionals.

In application security, Python appears on both sides: as the language used to build web applications (Django, Flask, FastAPI) and as the primary tool for testing them. Common Python security concerns include unsafe deserialization with pickle, command injection through os.system() and subprocess, SSTI in Jinja2 templates, path traversal in file operations, and SSRF in HTTP libraries like requests.

For offensive security, Python powers many essential tools — from Burp extensions and custom fuzzers to reverse shells and exploit proof-of-concepts. Libraries like pwntools, scapy, and impacket are staples in penetration testing. For defensive security, Python is used to build SIEM integrations, log analyzers, and automated incident response workflows.

This page collects Python security resources covering both secure coding practices for Python applications and Python-based security tooling for offensive and defensive work.

python.org

Read the Python guideA long-form, source-cited deep dive synthesized from every resource below. The comprehensive Python guide on chs.usA hand-written, in-depth practitioner guide — attacks, testing, and prevention.
Date Added Link Excerpt
2026-07-29 NEW 2026How to Set Up Semgrep for AI Code: 13 Steps 60 Min [2026] beginnerThis content provides a 13-step guide to setting up Semgrep for AI code, estimated to take 60 minutes. The provided link suggests it's a practical, instructional resource. No specific bug bounty payout amount is mentioned. → tech-insider.org
2026-07-28 NEW 2026Tryhackme New Room — FLIP intermediate 3 min read MobileWriteup of a TryHackMe room demonstrating a Ciphertext Interaction CBC Attack. This room's challenge involves exploiting an AES CBC implementation where a leaked ciphertext and knowledge of expected plaintext structure allow for manipulation. By XORing parts of the known leaked ciphertext with a derived plaintext, and then XORing that result with a modified plaintext prefix, one can craft a new ciphertext that bypasses the server's validation and retrieves the flag. The technique hinges on understanding how CBC chaining and XOR properties can be leveraged. → infosecwriteups.com
2026-07-28 NEW 2026Pickle Rick Tryhackme CTF intermediate 2 min read DeserWriteup details a CTF challenge exploiting a web server. Reconnaissance using Nmap revealed SSH and HTTP ports. Directory brute-forcing and checking `robots.txt` led to credentials (`R1ckRul3s:Wubbalubbadubdub`) for `login.php`. A command panel on `/portal.php` allowed command injection, enabling a Python reverse shell. Privilege escalation was achieved via `sudo -l`, granting unrestricted root access. The challenge involved finding three ingredients for Rick's potion. → infosecwriteups.com
2026-07-28 NEW 2026PyPI Blocks New Files on 14-Day-Old Releases to Prevent Package Poisoning newsPyPI has implemented a new security measure to combat package poisoning attacks. Starting now, new files will not be accepted for releases that are 14 days old or older. This change aims to prevent malicious actors from uploading compromised versions of older packages. The decision was made after discovering instances where attackers attempted to inject malware into established projects by uploading new files to outdated releases, exploiting the trust users have in those versions. → cyberpress.org
2026-07-27 NEW 2026PyPI Blocks New File Uploads to Old Releases to Prevent Package Poisoning Attacks newsPyPI has implemented a new security measure to prevent package poisoning attacks by blocking new file uploads to old releases of packages. This change aims to protect users from malicious code being injected into trusted software. Previously, attackers could upload malicious files to older, unmaintained versions of packages, and when users installed those older versions, they would inadvertently download and execute the malicious code. By restricting uploads to old releases, PyPI is making it harder for attackers to compromise the software supply chain. → gbhackers.com
2026-07-22 2026Leaking internal headers in Flask Ninja with deserialization intermediate 5 min read DeserWriteup on a Flask Ninja deserialization vulnerability where an attacker can leak internal headers. By crafting a malicious pickled `BearerAuth` object or influencing its configuration, an attacker can trick the framework's `HttpBearer.__call__` method into reading a header specified in the pickled object instead of the standard `Authorization` header, allowing for the exfiltration of sensitive information like reverse proxy injected headers. This issue impacts Flask Ninja applications that deserialize untrusted input and reflect rejected credentials.
2026-07-16 2026HN Security - My Semgrep C/C++ ruleset is ready for prime time again intermediate 5 min read SecretsLibrary featuring 50+ Semgrep rules for C/C++ vulnerability research, updated to version 2.0.0. It enhances static analysis by detecting dangerous API calls like `str*`, `mem*`, and `*printf` functions, improves pattern matching for memory allocations, and optimizes performance. The ruleset prioritizes identifying potential vulnerability hotspots over eliminating all false positives, serving as an assistant for developers and researchers rather than a fully automated CI/CD tool. It has been tested against NIST SAMATE test cases and is available in the official Semgrep registry.
2026-07-15 2026SUSE python-Pillow Security Update SUSE-SU-2026:2875-1 news 8 min readUpdate SUSE-SU-2026:2875-1 addresses four denial-of-service vulnerabilities (CVE-2026-54059, CVE-2026-54060, CVE-2026-55379, CVE-2026-55380) in the python-Pillow library, all with CVSS v3.1 scores of 7.5, caused by excessive memory allocation from crafted font or image data. This important security update impacts SUSE Linux Enterprise Desktop, Server, Real Time, and openSUSE Leap 15.3, requiring prompt application via YaST or zypper to mitigate risks on affected SUSE products.
2026-07-02 2026Hackers Use Mapbox Dead-Drop C2 and Python RAT to Target Vulnerability Researchers newsHackers are leveraging a novel technique using Mapbox as a dead-drop command-and-control (C2) infrastructure to target vulnerability researchers. This method utilizes a Python Remote Access Trojan (RAT) to establish communication. By exploiting Mapbox's features, attackers can stealthily receive instructions and exfiltrate data, making it difficult to detect their malicious activities. The primary goal appears to be compromising security professionals within the cybersecurity community. → cybersecuritynews.com
2026-07-02 2026Hackers Hide ChocoPoC Malware in Python Dependencies to Compromise Pentesters newsHackers are embedding ChocoPoC malware within compromised Python dependencies to target penetration testers. This malicious code is hidden in legitimate-looking packages, aiming to infect the systems of security professionals who use these libraries. The goal appears to be gaining access to sensitive information or the networks being tested by these pentesters. No specific bounty payout amount was mentioned in this content. → cyberpress.org
2026-07-01 2026Shipping post-quantum cryptography to Python intermediate 4 min readLibrary providing post-quantum cryptography support for Python's pyca/cryptography package. This release introduces ML-KEM (NIST-standard key-establishment) and ML-DSA (NIST-standard digital signatures), enabling migration for applications like Ansible and Certbot. While offering quantum resistance, these primitives have larger data sizes and different integration tradeoffs compared to classical algorithms such as Ed25519 and X25519. Future work includes implementing SLH-DSA and protocol integration. → blog.trailofbits.com
2026-06-28 2026Programming Languages for Cyber Security: What the Tools Use beginner 6 min readLibrary of articles exploring programming languages crucial for cybersecurity tool development and operation. It highlights Python as the dominant language for offensive and defensive tooling, citing examples like Impacket and Volatility 3. Bash and PowerShell are presented as essential for OS interaction, while C and C++ are linked to memory safety vulnerabilities and exploit development. JavaScript is key for web security, SQL for injection attacks and database defence, and Assembly for malware analysis and reverse engineering. Ruby's role is tied to Metasploit, and Rust and Go are positioned as future languages for secure tooling. → latesthackingnews.com
2026-06-27 2026BadHost - One character and your AI agent switches sides intermediate 3 min readWriteup on CVE-2026-48710 (BadHost), a critical vulnerability in Starlette, the Python framework powering FastAPI, vLLM, and LiteLLM. A single character in the HTTP "Host" header can bypass path-based access controls, allowing unauthorized access to sensitive endpoints and data. This impacts numerous AI agent deployments. A scanner by Nemesis and X41 D-Sec can test exposure, and patching Starlette to 1.0.1 or higher, or using `request.scope["path"]`, are recommended fixes.
2026-06-26 2026Python.org API Authentication Bypass Could Let Attackers Modify Download Metadata newsA security vulnerability has been discovered in the Python.org API that allows attackers to bypass authentication. This exploit could enable unauthorized individuals to modify download metadata for Python packages. The specifics of the vulnerability and its potential impact are detailed in a report. No bug bounty payout amount was mentioned in the provided content. → cyberpress.org
2026-06-25 2026Taming our Python dependencies at Microsoft with AI intermediate 9 min readTool, the Python Dependency Remediation extension for Visual Studio Code, uses AI to automatically analyze and update Python dependencies, significantly reducing remediation time and complexity for developers. This solution addresses the challenge of deeply interconnected dependency chains and the accumulation of vulnerabilities that arise from developers avoiding manual updates due to the intricate web of library relationships. → microsoft.com
2026-06-25 2026Langflow RCE Flaw Lets Attackers Execute Arbitrary Python Code Without Authentication newsA critical Remote Code Execution (RCE) vulnerability has been discovered in Langflow, a popular tool for building and managing LLM applications. This flaw allows unauthenticated attackers to execute arbitrary Python code on the server hosting Langflow. The vulnerability arises from insecure handling of user-provided inputs, enabling malicious code injection. Exploiting this could lead to complete system compromise. Users are strongly advised to update to the latest version of Langflow to patch this severe security risk. No bug bounty payout amount was specified in the provided content. → gbhackers.com
2026-06-25 2026Hunting Leaked PyPI Tokens: 62 Live, 125 Packages Exposed intermediate 4 min read Secrets Supply ChainAnalysis of leaked PyPI tokens reveals 62 live credentials, impacting 125 packages with approximately 25,000 monthly downloads. Using the `pypitoken` Python module, researchers decoded macaroons to identify token restrictions, such as `UserIDRestriction` and `ProjectIDsRestriction`. A method mimicking the `twine upload` command was employed to test token validity, with a 400 HTTP response indicating a live token. Despite GitHub's automated scanning, numerous tokens, many first leaked in 2024, remained active, suggesting gaps in automated detection. Responsible disclosure to the PyPI security team led to token revocation and improvements in their disclosure process. → blog.gitguardian.com
2026-06-23 2026AI Patching Reaches Open Source: OpenAI Patch the Planet Targets Python cURL Go news 8 min readLibrary for AI-driven vulnerability discovery and patching, Patch the Planet, leverages GPT-5.5-Cyber and Trail of Bits security engineers to identify, validate, and fix issues in open-source projects like cURL, Go, and Python. This initiative addresses the overwhelming influx of AI-generated bug reports by adding a human-review layer for validation and patch development, thereby improving security posture without burdening limited maintainer resources. The project also generates reusable security infrastructure, including fuzzing harnesses and analysis pipelines, benefiting participating open-source communities. → techtimes.com
2026-06-23 2026File encryption in Python: An in-depth exploration of symmetric and asymmetric techniques intermediate 7 min readLibrary for Python file encryption, detailing symmetric and asymmetric techniques. It covers Amazon's Key Management Service (KMS) with the `aws-encryption-sdk` for envelope encryption, and PyNaCl's `SecretBox` for symmetric file encryption and decryption. Additionally, it explores asymmetric encryption using PyNaCl's public/private box, emphasizing secure key management and communication. → snyk.io
2026-06-22 2026Code injection in Python: examples and prevention intermediate 7 min read RCELibrary for identifying and preventing code injection vulnerabilities in Python applications. It details common exploitation vectors, including insecure use of `eval()`, improper handling of user-controlled inputs, lack of input validation, dynamic code construction, and insecure deserialization. The library advocates for secure coding practices such as input sanitization, using safer alternatives like `literal_eval()`, parameterized queries, and strong access controls to mitigate these risks. → snyk.io
2026-06-21 2026Command injection in Python: examples and prevention intermediate 10 min read RCELibrary for preventing command injection vulnerabilities in Python applications, detailing how unsanitized user input passed to system shells via methods like `os.system()`, `subprocess.run(shell=True)`, dynamic command construction, and `eval()` can lead to exploits. It covers common scenarios, including vulnerabilities found in MLflow and PaddlePaddle, and emphasizes proactive mitigation through rigorous input validation, sanitization, and the use of parameterized queries to keep commands and data separate. → snyk.io
2026-06-21 2026Mastering Python virtual environments: A complete guide to venv, Docker, and securing your code intermediate 6 min readLibrary for managing Python virtual environments using `venv`, `virtualenv`, and `pipenv`, and securing Dockerized Python applications with Snyk. It details the creation, activation, and usage of isolated Python environments to prevent dependency conflicts, ensuring reproducible development workflows. The library also covers containerizing Python applications with Docker, including Dockerfile creation and execution, and vulnerability scanning with Snyk to enhance application security. → snyk.io
2026-06-21 2026Understanding and mitigating the Jinja2 XSS vulnerability (CVE-2024-22195) intermediate 3 min read XSSWriteup on CVE-2024-22195, a cross-site scripting vulnerability in the Jinja2 templating library affecting all versions prior to 3.1.3. The vulnerability arises from the `xmlattr` filter when keys contain spaces, allowing attackers to inject arbitrary HTML attributes and execute untrusted scripts. The article details reproduction steps and recommends upgrading to Jinja2 version 3.1.3. It also highlights the utility of tools like Snyk for continuous vulnerability monitoring in projects and containerized applications. → snyk.io
2026-06-19 2026The ultimate guide to creating a secure Python package beginner 14 min readGuide to creating secure Python packages, this tutorial details package structure, naming conventions, and configuration using `pyproject.toml`. It covers importing, installing from PyPI and private indexes with TLS recommendations, and specifying dependencies like NumPy. Modern packaging practices using `setuptools` as a build backend are emphasized over older `setup.py` methods. → snyk.io
2026-06-19 2026Symmetric vs. asymmetric encryption: Practical Python examples beginner 14 min readLibrary implementing symmetric and asymmetric encryption in Python, demonstrating practical use cases with examples for TLS/SSL, end-to-end messaging, and secure data storage. It covers algorithms like DES, 3DES, and AES, with a focus on envelope encryption for secure key management, using AWS KMS and the AWS Encryption SDK for practical implementation. → snyk.io
2026-06-19 2026How to secure Python Flask applications intermediate 14 min read API SecLibrary for securing Python Flask applications, addressing common vulnerabilities like XSS, CSRF, and SQL injection. It details insecure configurations such as secret key exposure, enabled debug mode in production, and unprotected sensitive data in configuration files. The guide recommends best practices including using environment variables for credentials, securely generating secret keys with the `uuid` module, and utilizing the Snyk platform for vulnerability detection and mitigation within IDEs and CI pipelines. → snyk.io
2026-06-18 2026Ultralytics AI Library Hacked via GitHub for Cryptomining intermediate 4 min read Supply ChainLibrary exploiting GitHub Actions for supply chain attack. Versions 8.3.41 and 8.3.42 of the Ultralytics Python package were compromised, injecting XMRig cryptominer. The attack leveraged a vulnerability in the "Publish Docs" workflow, allowing arbitrary code execution via crafted branch names. This impacted not only Ultralytics but also dependent packages like ComfyUI Impact Pack, highlighting risks in CI/CD pipelines and popular AI libraries. → wiz.io
2026-06-18 202610 Dimensions of Python Static Analysis beginner 19 min readLibrary for static analysis in Python, covering its importance for detecting bugs, security vulnerabilities, and stylistic issues without code execution. It details dimensions like type checking with tools such as Mypy, Pyright, and Pyre, and linting with Pylint, Flake8, and Pyflakes to enforce coding standards and identify code smells. The library also highlights security vulnerability detection capabilities, mentioning tools like Bandit and Snyk Code for spotting risks such as SQL injection. → snyk.io
2026-06-10 2026Three’s a Crowd: TeamPCP trojanizes LiteLLM in Continuation of Campaign news 3 min read Secrets Supply ChainWriteup detailing the TeamPCP campaign's exploitation of LiteLLM, specifically versions 1.82.7 and 1.82.8, which utilized Python's .pth mechanism for stealthy code execution. This attack, building on prior compromises of Trivy and Checkmarx GitHub Actions, exfiltrates cloud credentials, CI/CD secrets, and various keys to attacker-controlled domains, posing a significant risk to environments utilizing the LiteLLM library. → wiz.io
2026-06-09 2026Shai-Hulud Malware Campaign Abuses 23 PyPI Packages in Developer-Focused Attack newsThe Shai-Hulud malware campaign has compromised 23 packages on the Python Package Index (PyPI), targeting developers. This sophisticated attack leverages popular libraries to distribute malicious code, aiming to steal credentials and other sensitive information from unsuspecting users. The campaign highlights the growing threat of supply chain attacks within the open-source ecosystem. Developers are urged to exercise caution, review dependencies, and implement robust security practices to mitigate risks associated with such compromises. → gbhackers.com
2026-06-09 2026New Shai-Hulud Attack Compromises 23 PyPI Packages to Target MCP Developers newsA new sophisticated attack, dubbed "Shai-Hulud," has compromised 23 packages on the Python Package Index (PyPI). The malicious code was designed to specifically target developers working on "MCP" (Multi-Chain Platform) projects. This attack highlights a growing trend of supply chain vulnerabilities in open-source ecosystems, where attackers inject malicious code into widely used libraries to compromise downstream users. Developers are urged to audit their dependencies and update to clean versions immediately. → cybersecuritynews.com
2026-06-09 2026Snyk and uv, Better Together intermediate 3 min read AILibrary that pairs uv, a high-performance Python package manager, with Snyk for application security. This integration enables native CycloneDX SBOM export from uv, allowing Snyk to scan dependencies for vulnerabilities and license compliance. The partnership also introduces native uv support within the Snyk CLI and IDE integrations, aiming to provide built-in security for AI-native Python applications, ensuring speed and security are not mutually exclusive. → snyk.io
2026-06-09 2026How a Poisoned Security Scanner Became the Key to Backdooring LiteLLM news 9 min read RCE Supply ChainLibrary containing a backdoor that exploited Trivy security scanner vulnerabilities to compromise LiteLLM Python packages, specifically versions 1.82.7 and 1.82.8. The malicious code was delivered via direct source injection or a `.pth` file, leading to credential theft, data exfiltration using AES-256 and RSA encryption, and persistence through systemd services and Kubernetes lateral movement. This attack chain is linked to the threat actor TeamPCP, identified by consistent infrastructure and an RSA public key shared with prior Trivy and KICS compromises. → snyk.io
2026-06-08 2026durabletask: TeamPCP's Latest PyPi Compromise news 2 min read Supply ChainAnalysis of the TeamPCP supply chain attack details the compromise of Microsoft's official Python client, durabletask, specifically versions 1.4.1, 1.4.2, and 1.4.3. The attack leveraged compromised GitHub credentials to exfiltrate PyPI tokens and publish malicious code, targeting Microsoft's `durabletask-python` repository. Remediation steps include identifying exposure via lockfiles and CI logs, checking for persistence markers like `~/.cache/.sys-update-check`, rotating all credentials, auditing AWS SSM and Kubernetes activity, reviewing password manager sessions, and blocking C2 infrastructure. → wiz.io
2026-06-05 2026Malicious Python Package Mimics Parsimonious Parser newsA malicious Python package has been discovered that masquerades as the legitimate "Parsimonious" parser library. Attackers are likely using this to compromise systems that depend on the original package. Users are advised to exercise extreme caution and verify the authenticity of any installed "Parsimonious" package. No bounty payout amount is mentioned in this content. → gbhackers.com
2026-06-05 2026Type Level Security for Secure AI Code Generation advanced 6 min readLibrary implementing type-level security to prevent vulnerabilities like Insecure Direct Object Reference (IDOR) and DOM XSS. It demonstrates code patterns in Python and Rust, showcasing how opaque types and access restrictions can enforce authentication and authorization checks at compile or lint time, ensuring secure data handling for both human developers and AI code generation. → snyk.io
2026-06-01 2026Millions of AI agents imperiled by critical vulnerability in open source package news 2 min readLibrary implementing ASGI for Python applications, Starlette, is vulnerable to CVE-2026-48710 (BadHost), allowing attackers to bypass authorization via a modified HTTP Host header. This critical vulnerability, trivially exploitable without proper firewalling, impacts FastAPI, vLLM, LiteLLM, and millions of AI agents relying on Starlette, potentially exposing sensitive data and third-party credentials. → arstechnica.com
2026-05-28 2026CISA Adds Actively Exploited Linux Root Access Bug CVE-2026-31431 to KEV news 3 min readWriteup of CVE-2026-31431, a Linux kernel privilege escalation vulnerability dubbed "Copy Fail," which allows unprivileged local users to achieve root access by corrupting the kernel's in-memory page cache. The vulnerability impacts Linux distributions shipped since 2017 and has been added to CISA's KEV catalog due to active exploitation. Exploitation is facilitated by a Python-based exploit that uses legitimate system calls, making detection difficult and lowering the entry barrier for attackers, posing significant risks to containerized environments like Docker, LXC, and Kubernetes. → thehackernews.com
2026-05-26 2026Starlette vulnerability exposes millions of AI agents to hackers news 2 min readLibrary for Python's Starlette framework addresses critical vulnerabilities including CVE-2024-47874 and CVE-2025-62727, which impact AI agents and crypto tools. These flaws enabled denial-of-service attacks through improper handling of large multipart form data and crafted Range headers, respectively. Patched versions are 0.40.0 and 0.49.1, though widespread adoption across thousands of downstream projects may lag, leaving AI-driven trading bots and DeFi automation tools exposed to memory poisoning and unauthorized transactions. → cryptobriefing.com
2026-05-26 2026llama.cpp GGUF Parser Flaws: Critical Integer Overflow Enables Arbitrary Reads in Every Local AI Stack advanced 7 min readLibrary of six vulnerabilities found in llama.cpp's GGUF parser, including a critical integer overflow (V-01) allowing arbitrary file reads and memory exhaustion flaws (V-02, V-03) affecting tools like Ollama and LM Studio. These issues, including V-01 and V-02, are present in the C++ gguf.cpp and Python gguf_reader.py implementations, and unlike CVE-2026-7482 (Bleeding Llama), do not have assigned CVE numbers, bypassing standard scanning workflows. → techtimes.com
2026-05-22 2026Microsoft DurableTask Python Client Targeted in TeamPCP Cyberattack news 2 min readWriteup on the TeamPCP supply chain attack that compromised the Microsoft DurableTask Python client, specifically versions 1.4.1, 1.4.2, and 1.4.3. The attackers leveraged a compromised GitHub user to gain access to repository secrets, including a PyPI token, allowing them to publish trojanized versions. The payload, an evolution of previous malware, steals cloud credentials from AWS, Azure, GCP, Kubernetes, and Vault, and propagates via AWS SSM and Kubernetes, also attempting to unlock password managers like Bitwarden. → gbhackers.com
2026-05-20 2026Microsoft DurableTask Python Client Compromised by TeamPCP news 3 min readAnalysis of TeamPCP's compromise of Microsoft's DurableTask Python client, detailing the supply chain attack that injected malicious versions (1.4.1–1.4.3) into PyPI. The actor exploited compromised GitHub credentials to obtain a PyPI API token, bypassing Microsoft's CI/CD pipeline to upload tainted packages. The malware, featuring a Python zipapp payload, exfiltrated AWS, Azure, GCP, Kubernetes, HashiCorp Vault, and other credentials, and propagated laterally via AWS SSM and Kubernetes. This incident links to the broader Mini Shai-Hulud campaign. → cyberpress.org
2026-05-20 2026Microsoft's durabletask package on PyPi Compromised. Mini Shai Hulud attacks again... again! news 8 min readLibrary versions 1.4.1, 1.4.2, and 1.4.3 of Microsoft's `durabletask` Python package on PyPI were compromised with a dropper that executes a sophisticated infostealer and worm. This payload targets credentials from cloud providers, password managers, and developer tools, propagating via SSM or kubectl in cloud environments. It also includes a destructive component triggered by specific system locales. The malware exfiltrates data encrypted with an RSA key and utilizes a GitHub-based dead-drop for command and control. → aikido.dev
2026-05-19 2026Max-severity flaw in ChromaDB for AI apps allows server hijacking news 2 min readVulnerability in ChromaDB allows unauthenticated attackers to execute arbitrary code on exposed servers, tracked as CVE-2026-45829. This flaw in the Python API server logic enables attackers to embed malicious model settings before authentication, forcing ChromaDB to load and execute a harmful model from platforms like Hugging Face. Mitigation includes using the Rust frontend, restricting network access, and scanning ML model artifacts before runtime. → bleepingcomputer.com
2026-05-13 2026JDownloader Hack Spreads New Python RAT news 2 min readWriteup on the JDownloader supply-chain attack where attackers exploited a CMS vulnerability to distribute malicious installers containing a Python RAT. The attack affected Windows and Linux users who downloaded alternative installers between May 6-7, 2026, with the malware allowing remote code execution and using spoofed signatures. Analysis revealed a modular bot framework with identified C2 endpoints and injected code in the Linux variant disguised as `/usr/libexec/upowerd`. Users are advised to reinstall their operating systems if affected. → gbhackers.com
2026-05-12 2026What AI 'fingerprints' helped expose the 1st AI-made zero-day exploit? | The exploit was a Python script beginnerResearchers discovered the first zero-day exploit generated by AI. The exploit was written as a Python script. The article's title suggests that unique "AI fingerprints" were crucial in identifying this novel threat, distinguishing it from human-crafted exploits. This marks a significant development in cybersecurity, highlighting AI's potential for both creating and detecting sophisticated attacks. The specific details of these "fingerprints" and how they led to the exposure of the exploit are likely discussed within the linked content.
2026-05-12 2026Microsoft Warns Of Compromised mistralai PyPI Package news 2 min readLibrary compromise via Mistralai v2.4.6 on PyPI, flagged by Microsoft, demonstrates a sophisticated supply chain attack. This poisoned package executes hidden malicious code upon import, connecting to 83[.]142[.]209[.]194 to download a second-stage payload named transformers.pyz from /tmp, designed to steal credentials and API keys. The malware also installs persistence mechanisms like pgmonitor.py and pgsql-monitor.service. Organizations are urged to isolate affected hosts, block the malicious IP, search for the payload, and rotate credentials immediately. → cyberpress.org
2026-05-12 2026Operation HumanitarianBait Uses Fake Aid Documents to Deploy Python Spyware news 3 min readLibrary for detecting Operation HumanitarianBait, a Python spyware campaign targeting Russian speakers with fake humanitarian aid documents. This campaign utilizes LNK files within RAR archives, fileless execution via PowerShell, and obfuscation with PyArmor v9.2 Pro. The malware steals credentials from Chromium and Firefox browsers, exfiltrates Telegram session data, searches for cryptocurrency private keys, logs keystrokes, captures screenshots, and establishes remote access via RustDesk or AnyDesk. Persistence is maintained through Windows Scheduled Tasks and VBScript launchers, with C2 infrastructure hosted by Namecheap. → hackread.com
2026-05-11 2026Python Infostealer Uses GitHub Releases To Bypass Security Tools news 2 min readLibrary utilizing GitHub Releases to evade security tools, as seen in Operation HumanitarianBait. This Python infostealer employs social engineering, PowerShell memory execution, PyArmor obfuscation, and fileless operation to harvest browser credentials, keystrokes, and Telegram data. It maintains persistence via scheduled tasks and installs legitimate remote desktop applications for covert access, demanding user vigilance and endpoint monitoring for defense. → cyberpress.org
2026-05-10 2026JDownloader Website Supply Chain Attack: Installers Replaced with Python RAT Malware (May 2026) news 5 min readWriteup of the JDownloader website supply chain attack (May 2026), detailing how an unpatched CMS vulnerability allowed attackers to replace Windows and Linux installers with a Python RAT and ELF binaries respectively. The attack, active for approximately 24 hours, utilized obfuscation and persistence techniques, including SUID-root binaries for Linux. This incident highlights the risks of unauthorized changes to web content and the importance of verifying digital signatures. → rescana.com

Frequently Asked Questions

What are common Python security vulnerabilities?
Common Python security issues include unsafe deserialization with pickle, command injection through os.system() and subprocess with shell=True, Server-Side Template Injection in Jinja2, path traversal in file operations, SSRF in the requests library, and SQL injection when using string formatting instead of parameterized queries.
Why is Python popular in cybersecurity?
Python's readability, extensive standard library, and rich ecosystem of security packages make it ideal for exploit development, automation, and tool building. Libraries like pwntools, scapy, impacket, and requests are widely used in penetration testing. Python is also the primary language for Burp Suite extensions (via Jython) and many security scanners.
How do you write secure Python code?
Use parameterized queries for database access, avoid pickle for untrusted data (use JSON instead), never use eval() or exec() on user input, use subprocess with shell=False and explicit argument lists, validate and sanitize file paths to prevent traversal, and keep dependencies updated to patch known vulnerabilities.

Weekly AppSec Digest

Get new resources delivered every Monday.