---
title: "Vulnerability and malware checks in uv"
description: "uv gains two preview security features: `uv audit`, a native replacement for pip-audit that checks locked dependencies against known vulnerabilities and adverse statuses like deprecation, running 4-10x faster on typical projects, and an opt-in malware check (`UV_MALWARE_CHECK=1`) that queries OSV for MAL advisories on every sync and aborts before malicious code runs."
url: "https://swe.quest/articles/vulnerability-and-malware-checks-in-uv-b720e417a88a2049"
canonical: "https://astral.sh/blog/uv-audit"
source: "Astral"
published: "2026-06-08"
difficulty: "easy"
kind: "Announcement"
reading_minutes: 6
tags: ["supply-chain-security","python","build-systems"]
---

# Vulnerability and malware checks in uv

A post on [Astral](https://swe.quest/sources/astral.md), published 2026-06-08, 6 min read, Announcement. Original: [https://astral.sh/blog/uv-audit](https://astral.sh/blog/uv-audit)

## Summary

uv gains two preview security features: \`uv audit\`, a native replacement for pip-audit that checks locked dependencies against known vulnerabilities and adverse statuses like deprecation, running 4-10x faster on typical projects, and an opt-in malware check (\`UV\_MALWARE\_CHECK=1\`) that queries OSV for MAL advisories on every sync and aborts before malicious code runs. The malware check exists because PyPI quarantines only remove the index pointer, so lockfiles that reference object storage directly can still install quarantined distributions. Because it relies on public advisories, dependency cooldowns are still recommended. Planned work includes vulnerability-aware resolution, reachability analysis with ty, and alternative backends such as PYSEC.

Written by swe.quest, not by the author.

**Difficulty:** Easy: no special background needed; explains what something is and why it matters

## Topics

- [Supply chain security](https://swe.quest/tags/supply-chain-security.md) (Security)
- [Python](https://swe.quest/tags/python.md) (Languages)
- [Build systems](https://swe.quest/tags/build-systems.md) (Engineering practices)

## Prerequisites

- Python packaging basics ([easy posts on Python](https://swe.quest/tags/python.md?difficulty=easy))
- lockfiles

## Keywords

uv, uv audit, pip-audit, OSV, PyPI, ty, pylock.toml

## Related posts

- [Securing Python projects from supply-chain attacks](https://swe.quest/articles/securing-python-projects-from-supply-chain-attacks-9ecc242dbcff9bf0.md): Astral · 2026-11-23 · Medium · 7 min read · Supply chain security, Python, CI/CD, Build systems
  Hash-pinning is the core defense against compromised maintainer accounts or hacked distribution servers, because version pins alone fail when PyPI files can be added post-release and GitHub Action tags can be force-pushed.
- [tar-codec: a fast and secure tar parser for the Rust ecosystem](https://swe.quest/articles/tar-codec-a-fast-and-secure-tar-parser-for-the-rust-ecosystem-feb4c15b6b2e61b3.md): Astral · 2026-10-27 · Medium · 25 min read · Rust, Supply chain security, Python, Application security
  tar-codec is a new Rust tar parser that uv uses from 0.13 onward to read Python source distributions.
- [Safer Docker Hub Pulls via a Sonatype-Protected Proxy](https://swe.quest/articles/safer-docker-hub-pulls-via-a-sonatype-protected-proxy-26e088a0814cbf2c.md): Docker · 2026-01-14 · Medium · 7 min read · Supply chain security, Containers, Caching
  Routing Docker Hub pulls through a Nexus Repository Docker proxy with Sonatype Repository Firewall gives an organization a single, auditable checkpoint.
- [Our response to the TanStack npm supply chain attack](https://swe.quest/articles/our-response-to-the-tanstack-npm-supply-chain-attack-a4ee1bd194da9989.md): OpenAI · 2026-05-13 · Easy · 6 min read · Supply chain security, Incidents & postmortems, JavaScript, CI/CD
  Two OpenAI employee devices were compromised via the malicious TanStack npm package in the Mini Shai-Hulud supply chain attack, leading to credential-focused exfiltration from a limited set of internal repositories that held code-signing certificates for iOS, macOS and Windows apps.
- [Coding Agent Horror Stories: The CVE That Did Not Exist](https://swe.quest/articles/coding-agent-horror-stories-the-cve-that-did-not-exist-6a97fa18ca5ac54f.md): Docker · 2026-10-29 · Medium · 15 min read · AI agents, Sandboxing & isolation, AI for coding, Code review, CI/CD
  A self-hosted, read-only AI code review bot running on Ollama answered a routine PostgreSQL 16.11→16.13 patch bump with a 1,500-word report alleging an "architectural takeover".

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
