A vulnerability in the pure-Python HTTP parser used by aiohttp can cause excessive memory consumption and repeated processing of pipelined requests. This occurs when the pipelined request queue is full and an upgrade request is declined, causing the internal buffer to grow and requests to be replayed. The issue affects users relying on the Python parser instead of the default C parser.
AIOHTTP contains a vulnerability in its multipart handling where base64-encoded parts 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.
A vulnerability in aiohttp's WebSocket implementation allows attackers to bypass receive queue limits by sending many small or compressed messages. This can cause excessive memory consumption on the server or client side. The issue is fixed in version 4.0.0.
AIOHTTP versions 3.9.1 up to but not including 4.0.0 contain a vulnerability where decompressing concatenated compressed streams (gzip, deflate, or zstd) causes excessive CPU usage due to quadratic time complexity. This can be exploited by an attacker sending specially crafted compressed request bodies or WebSocket messages to block the server's event loop. The issue is fixed in version 4.0.0.
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 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.