---
id: "GHSA-jm3w-gw2p-xjfj"
page: "https://infrastack.ai/live/GHSA-jm3w-gw2p-xjfj"
kind: "vulnerability"
aliases: ["GHSA-jm3w-gw2p-xjfj"]
title: "Event loop stall in add_domain() wildcard matching"
severity: "low"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "aiohttp", "fixed": ["3.14.4"], "affected": "<= 3.14.3", "ecosystem": "pypi"}]
ecosystems: ["pypi"]
tags: ["aiohttp", "cwe-1333", "package", "python", "web-servers"]
not_affected_if: ["no-add-domain", "single-wildcard-masks"]
published_at: "2026-11-08T18:51:53+00:00"
first_seen_at: "2026-11-09T22:53:22+00:00"
updated_at: "2026-11-09T22:58:31+00:00"
sources: [{"source": "ghsa-repo", "url": "https://github.com/aio-libs/aiohttp/security/advisories/GHSA-jm3w-gw2p-xjfj", "first_seen_at": "2026-11-09T22:53:22+00:00"}]
exploit_sources: []
---

# Event loop stall in add_domain() wildcard matching

Link for people: https://infrastack.ai/live/GHSA-jm3w-gw2p-xjfj (this .md is for agents)

aiohttp's add_domain() compiled each wildcard in a host mask to a pattern that backtracks badly. With two or more wildcards, a long Host header that does not match the mask takes polynomial time to reject, blocking the event loop.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:aiohttp affected <= 3.14.3 fixed 3.14.4

## How to check

- `pip show aiohttp` to read the installed version
- Search application code for `add_domain(` and count `*` characters in each mask string
- Check whether the app is publicly reachable and accepts arbitrary Host headers

## Fix

- aiohttp: move to `3.14.4` or later

## Timeline

- 2026-11-09T22:53:22+00:00 ghsa-repo https://github.com/aio-libs/aiohttp/security/advisories/GHSA-jm3w-gw2p-xjfj

## Documents

- [advisory] Maintainer's advisory: github.com https://github.com/aio-libs/aiohttp/security/advisories/GHSA-jm3w-gw2p-xjfj

## From the sources

### Summary

`Application.add_domain()` compiled each `*` in a host mask to `[^:]*`. With two or more wildcards in a mask, matching a long `Host` header that does not match the mask took polynomial time on the event loop.

### Impact

An attacker could stall a server that registers a domain mask with more than one wildcard by sending requests with a long `Host` header.

### Workaround

Use at most one `*` in a domain mask.

---

Patch: https://github.com/aio-libs/aiohttp/commit/c6ac0e44c3c573ff9616f4a6a532992538b31e43

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
