VAITP Dataset

← Back to the dataset

CVE-2026-111749

Subdomain can strip host‑only flag from parent‑domain cookies (pre‑3.14.4).

  • CVSS 2.3
  • CWE-565
  • Authentication, Authorization, and Session Management
  • Remote

AIOHTTP is an asynchronous HTTP client/server framework for asyncio and Python. Prior to 3.14.4, Host-Only scope on an existing parent-domain cookie can be removed by a subdomain. A user who accesses an untrusted subdomain can consequently have host-only protections stripped from cookies, although impact is limited when applications do not reflect those cookies to a browser. This issue is fixed in version 3.14.4.

CVSS base score
2.3
Published
2026-10-19
OWASP
A06 Vulnerable and Outdated Components
Orthogonal defect classification
Interface
Code defect classification
Incorrect Check
Category
Authentication, Authorization, and Session Management
Subcategory
Session Management Issues
Accessibility scope
Remote
Impact
Unauthorized Access
Affected component
aiohttp
Fixed by upgrading
Yes

Solution

Upgrade aiohttp to version 3.14.4 or later.

Vulnerable code sample

import aiohttp.web

async def login(request):
    token = "secure-token"
    resp = aiohttp.web.Response(text="Logged in")
    # VULNERABLE: host-only stripped by subdomain
    resp.set_cookie('session_id', token, domain='example.com')
    return resp

Patched code sample

import aiohttp.web

async def login(request):
    token = "secure-token"
    resp = aiohttp.web.Response(text="Logged in")
    # FIX: keep host-only by not setting domain
    resp.set_cookie('session_id', token)
    return resp

Published fix

Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.

  • Fix host-only state on cookie expiration (#13674) (#13676) (aio-libs/aiohttp)
    aiohttp/abc.py · AbstractCookieJar.host_only_cookies, aiohttp/cookiejar.py · CookieJar.filter_cookies, aiohttp/cookiejar.py · CookieJar.host_only_cookies, aiohttp/cookiejar.py · CookieJar.save, aiohttp/cookiejar.py · CookieJar.update_cookies, aiohttp/cookiejar.py · CookieJar._delete_cookies, aiohttp/cookiejar.py · CookieJar.__init__, aiohttp/cookiejar.py · DummyCookieJar.host_only_cookies

Cite this entry

@misc{vaitp:cve2026111749,
  title        = {{Subdomain can strip host‑only flag from parent‑domain cookies (pre‑3.14.4).}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-111749},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-111749/}}
}

Download this entry as JSON Download the whole dataset

Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.