Open Redirect Vulnerability in python-aiohttp: USN-5386-1

python-aiohttp Updated 03 Oct 2025

Summary

21/04/2022
N/A
Yes i
Unrated
Not published

USN-5386-1: python-aiohttp vulnerability. Affects python-aiohttp versions < 3.0.1-1ubuntu0.1~esm1. Fixed in 3.0.1-1ubuntu0.1~esm1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

python-aiohttp is an asynchronous HTTP client/server framework for Python, designed to provide a simple and efficient way to handle HTTP requests and responses. It is widely used in web applications for its non-blocking capabilities, allowing for high performance and scalability. However, a recently discovered vulnerability exposes it to potential open redirect attacks, which could be exploited by malicious actors.

Vulnerability Detail

The vulnerability, identified as CVE-2021-21330, was discovered by Jelmer Vernooij and Beast Glatisant. It arises from the incorrect handling of certain URLs within the AIOHTTP framework, leading to an open redirect issue. This flaw allows a remote attacker to manipulate URLs, potentially redirecting users to malicious sites, thereby facilitating phishing attacks. The risk is particularly significant as it can compromise user data and trust in applications utilizing the affected package.

How To Fix

Minimum fixed version

3.0.1-1ubuntu0.1~esm1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-aiohttp

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary measure, it is advisable to validate and sanitize all user inputs and URLs before processing them within your application. This can help mitigate the risk of open redirect attacks until the package is updated. Implementing strict URL whitelisting can also be an effective strategy.

Conclusion

The python-aiohttp package has a critical vulnerability that could lead to open redirect attacks, posing significant risks to users and applications. It is crucial to update to the patched versions provided by Ubuntu Pro to mitigate these risks. Additionally, employing workarounds can help protect applications until updates are applied.

See every vulnerability recorded for python-aiohttp →

Share this vulnerability

FAQ

An open redirect vulnerability occurs when an application accepts a user-controlled input that specifies a URL to redirect to, allowing attackers to redirect users to malicious sites.

You can check if your application is affected by using Vulert, which monitors and alerts for open-source vulnerabilities. You can use the Vulert playground to analyze your manifest file without any signup.

If exploited, this vulnerability can lead to phishing attacks, where users are redirected to malicious sites, potentially compromising their sensitive information.

Yes, patches are available for the affected versions of python-aiohttp. Users are encouraged to update to the latest patched versions as soon as possible.

If immediate updates are not possible, implement input validation and URL whitelisting as a temporary workaround to reduce the risk of exploitation.

Related vulnerabilities

Recent vulnerabilities recorded for python-aiohttp.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

3.0.1-1ubuntu0.1~esm1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-aiohttp

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback