A vulnerability in AIOHTTP's pure-Python HTTP parser causes buffer growth and request replay when handling declined upgrade requests with a full pipelined request queue. This can lead to excessive memory consumption and multiple processing of pipelined requests. The issue affects versions 3.9.1 up to but not including 4.0.0 and is fixed in version 4.0.0. Users relying on the pure-Python parser (e.g., with AIOHTTP_NO_EXTENSIONS) are impacted. Switching to the default C parser mitigates the issue.
AIOHTTP versions 3.9.1 up to but not including 4.0.0 have a vulnerability where data received during an HTTP upgrade request (such as a WebSocket handshake) is buffered without limit until the upgrade handler completes. This can lead to unbounded memory consumption if an attacker streams excessive data behind the upgrade request. The issue is fixed in version 4.0.0.
AIOHTTP versions from 3.9.1 up to but not including 4.0.0 contain a vulnerability in the WebSocket max_msg_size check due to an integer overflow in the C extension. This flaw allows an attacker to bypass the maximum message size limit by sending a specially crafted WebSocket message with a declared length near 2^63, causing unbounded memory use. The issue is fixed in version 4.0.0. A workaround is to disable the C extension by setting AIOHTTP_NO_EXTENSIONS=1, which uses the unaffected Python reader.
AIOHTTP versions 3.9.1 up to but not including 4.0.0 contain a vulnerability where multipart parts encoded with base64 can bypass the client_max_size limit. This occurs because the BodyPartReader.read_chunk() method reads until the chunk length is a multiple of 4 without enforcing a byte limit, allowing an attacker to cause excessive memory consumption or event loop blocking by sending specially crafted multipart requests. The issue is fixed in version 4.0.0.
AIOHTTP versions from 3.9.1 up to but not including 4.0.0 have a vulnerability where the Request.post() method does not limit the number of URL-encoded form fields. This can cause the event loop to be blocked due to quadratic time complexity when processing many repeated keys in a MultiDict. The issue is fixed in version 4.0.0.
AIOHTTP's client CookieJar component improperly parsed Set-Cookie headers, creating extra cookies from unrecognized name=value attributes without limiting the number of stored cookies. This allowed a malicious server to cause excessive memory and CPU usage on the client by making it store a very large number of cookies, resulting in oversized Cookie headers on subsequent requests. The issue affects versions from 3.9.1 up to but not including 4.0.0 and is fixed in version 4.0.0.
AIOHTTP's Application.add_domain() function had a performance issue where using two or more wildcards in a domain mask caused polynomial-time processing of long Host headers, leading to event loop stalls. This could allow an attacker to stall the server by sending requests with long Host headers against such domain masks. The issue affects versions from 3.9.1 up to but not including 4.0.0 and is fixed in version 4.0.0.
The NLTK library's dot2img function executes the Graphviz 'dot' binary without applying the trusted-execution security checks that NLTK uses elsewhere. This allows a local unprivileged attacker on a POSIX system to place a malicious 'dot' executable in a writable directory on the victim's PATH, leading to arbitrary code execution when dot2img is invoked. The vulnerability arises because dot2img only performs a basic binary search without ownership or environment scrubbing, unlike other NLTK wrappers. This flaw enables local code execution in the victim's user context without requiring control over NLTK inputs.
The NLTK library's sql_query() function in the chat80 module bypasses the pathsec sandbox intended to restrict SQLite database access to specific data roots. It does so by following symbolic links inside trusted data roots that point to SQLite databases outside those roots, allowing read access to out-of-sandbox databases. This occurs because sql_query() uses nltk.data.find() which only performs lexical checks and does not resolve symlinks, unlike other functions that enforce path containment. An attacker with write access to a trusted NLTK data root can exploit this to read sensitive SQLite databases elsewhere on the filesystem.
NLTK's save_maxent_params() and load_maxent_params() functions contain a path traversal vulnerability that allows arbitrary file read and write outside the intended directories. This occurs because these functions construct file paths from a user-controlled argument and open files directly without enforcing NLTK's pathsec security mechanism. The vulnerability bypasses the filesystem sandboxing intended by pathsec, potentially allowing attackers to read or overwrite files outside permitted directories. The issue has been fixed in NLTK version 3.8.1_3 and later.
AIOHTTP versions 0.6.0 up to but not including 0.7.0 and versions 0.8.0 are affected by a vulnerability in the WebSocket receive queue handling. The issue allows the receive queue limits to be bypassed by sending many small or compressed messages, especially when permessage-deflate compression is used. This can cause excessive memory consumption on the server or client side. A fix is available in version 0.7.0.
AIOHTTP versions >=0.6.0 <0.7.0 and >=0.8.0 contain a vulnerability where decompressing concatenated compressed streams (gzip, deflate, or zstd) causes excessive CPU usage due to quadratic time complexity. This can block the event loop of servers or clients when processing specially crafted compressed payloads. The issue is fixed in version 0.7.0.
In nanobot, the WebSocket gateway allows a standard client holding a valid client token to select an existing directory outside the operator-configured workspace as the root of a new conversation. The agent can then read and expose files in that directory that are readable by the nanobot service account.
This issue affects nanobot (nanobot-ai) from 0.3.5 before 0.4.1.