CVE-2026-54276: aiohttp DigestAuthMiddleware Applies Credentials To Cross-Origin Vulnerability

MODERATE
Advisory Identifier: GHSA-hpj7-wq8m-9hgp
CWE-522 CWE-200
Published
Advisory Summary

CVE-2026-54276 is a MODERATE digestauthmiddleware applies credentials to cross-origin vulnerability (CWE-522: Insufficiently Protected Credentials) affecting aiohttp libraries in the PyPI ecosystem. The issue involves digestauthmiddleware applies credentials to cross-origin redirect challenges. Remediation is available by upgrading affected packages to version 3.14.1.

CVE-2026-54276 at a Glance

CVE Identifier CVE-2026-54276
GHSA Identifier GHSA-hpj7-wq8m-9hgp
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-522: Insufficiently Protected Credentials
Affected Product aiohttp
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2026-54276

To remediate this vulnerability, upgrade all affected aiohttp dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

aiohttp fixed: 3.14.1
pip install aiohttp>=3.14.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show aiohttp

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-54276, inspect your installed packages using pip:

pip show aiohttp

Analyze the terminal output to locate any version of aiohttp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.14.1), your application is affected.

Note: The pip show aiohttp command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-522: Insufficiently Protected Credentials, where the product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval. In aiohttp, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary ``DigestAuthMiddleware`` can send an authentication response after following a cross-origin redirect. ### Impact If the client follows a redirect (the default option) to an attacker controlled domain, the attacker may be able to extract the auth digest. This likely requires an open redirect vulnerability or similar on the target domain for an attacker to be able to execute. Further, the attacker is only receiving the digest, so should only be able to extract the user's credentials if the cryptography is weak or there is some kind of password reuse. ### Workaround Disable ``follow_redirects`` if this is a concern. ----- Patch: https://github.com/aio-libs/aiohttp/commit/38d16060037e1bfcd6d677abababa3c2a4bb58fa

CVE-2026-54276 Affected aiohttp Versions

1 component(s)
Fixed Versions:
3.14.1
Product / Package Ecosystem Affected Versions Fixed Version
aiohttp
PyPI
< 3.14.1
3.14.1

References

Frequently Asked Questions

What is CVE-2026-54276?
CVE-2026-54276 is a security vulnerability in aiohttp involving DigestAuthMiddleware Applies Credentials to Cross-Origin Redirect Challenges under CWE-522: Insufficiently Protected Credentials.
Which aiohttp versions are affected?
Affected versions include releases prior to 3.14.1 across affected packages: aiohttp.
What version fixes CVE-2026-54276?
Upgrading to 3.14.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is aiohttp affected?
Yes, aiohttp is affected in releases prior to 3.14.1. Upgrade your dependency to 3.14.1 or later.
What CWE is associated with CVE-2026-54276?
CVE-2026-54276 is classified under CWE-522: Insufficiently Protected Credentials (The product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval.).
How can I check PyPI dependencies for CVE-2026-54276?
Run the dependency tree command: 'pip show aiohttp'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-hpj7-wq8m-9hgp",
  "modified" : "2026-06-15T20:09:06Z",
  "published" : "2026-06-15T20:09:06Z",
  "aliases" : [ "CVE-2026-54276" ],
  "summary" : "aiohttp: DigestAuthMiddleware Applies Credentials to Cross-Origin Redirect Challenges",
  "details" : "### Summary\n\n``DigestAuthMiddleware`` can send an authentication response after following a cross-origin redirect.\n\n### Impact\n\nIf the client follows a redirect (the default option) to an attacker controlled domain, the attacker may be able to extract the auth digest.\n\nThis likely requires an open redirect vulnerability or similar on the target domain for an attacker to be able to execute. Further, the attacker is only receiving the digest, so should only be able to extract the user's credentials if the cryptography is weak or there is some kind of password reuse.\n\n### Workaround\n\nDisable ``follow_redirects`` if this is a concern.\n\n-----\n\nPatch: https://github.com/aio-libs/aiohttp/commit/38d16060037e1bfcd6d677abababa3c2a4bb58fa",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "aiohttp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.14.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.14.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/aio-libs/aiohttp/security/advisories/GHSA-hpj7-wq8m-9hgp"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/aio-libs/aiohttp/commit/38d16060037e1bfcd6d677abababa3c2a4bb58fa"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/aio-libs/aiohttp"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-522" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-15T20:09:06Z",
    "nvd_published_at" : null
  }
}