CVE-2026-40115
PraisonAI has an Unrestricted Upload Size in WSGI Recipe Registry Server Enables Memory Exhaustion DoS
PraisonAI is a multi-agent teams system. Prior to 4.5.128, the WSGI-based recipe registry server (server.py) reads the entire HTTP request body into memory based on the client-supplied Content-Length header with no upper bound. Combined with authentication being disabled by default (no token configured), any local process can send arbitrarily large POST requests to exhaust server memory and cause a denial of service. The Starlette-based server (serve.py) has RequestSizeLimitMiddleware with a 10MB limit, but the WSGI server lacks any equivalent protection. This vulnerability is fixed in 4.5.128.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
6.2
PraisonAI has an Unrestricted Upload Size in WSGI Recipe Registry Server Enables Memory Exhaustion DoS
PraisonAI is a multi-agent teams system. Prior to 4.5.128, the WSGI-based recipe registry server (server.py) reads the entire HTTP request body into memory based on the client-supplied Content-Length header with no upper bound. Combined with authentication being disabled by default (no token configured), any local process can send arbitrarily large POST requests to exhaust server memory and cause a denial of service. The Starlette-based server (serve.py) has RequestSizeLimitMiddleware with a 10MB limit, but the WSGI server lacks any equivalent protection. This vulnerability is fixed in 4.5.128.
- Record
CVE-2026-40115- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-770
- Updated
- 2026-11-02
EUVDEUVD-2026-21160
6.2
PraisonAI is a multi-agent teams system. Prior to 4.5.128, the WSGI-based recipe registry server (server.py) reads the entire HTTP request body into memory based on the client-supplied Content-Length header with no upper bound. Combined with authentication being disabled by default (no token configured), any local process can send arbitrarily large POST requests to exhaust server memory and cause a denial of service. The Starlette-based server (serve.py) has RequestSizeLimitMiddleware with a 10MB limit, but the WSGI server lacks any equivalent protection. This vulnerability is fixed in 4.5.128.
- Record
EUVD-2026-21160- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-2xgv-5cv2-47vv
6.2
PraisonAI has Unrestricted Upload Size in WSGI Recipe Registry Server that Enables Memory Exhaustion DoS
Summary
The WSGI-based recipe registry server (server.py) reads the entire HTTP request body into memory based on the client-supplied Content-Length header with no upper bound. Combined with authentication being disabled by default (no token configured), any local process can send arbitrarily large POST requests to exhaust server memory and cause a denial of service. The Starlette-based server (serve.py) has RequestSizeLimitMiddleware with a 10MB limit, but the WSGI server lacks any equivalent protection.
Details
The vulnerable code path in src/praisonai/praisonai/recipe/server.py:
1. No size limit on body read (line 551-555):
content_length = int(environ.get("CONTENT_LENGTH", 0))
body = environ["wsgi.input"].read(content_length) if content_length > 0 else b""
The content_length is taken directly from the HTTP header with no maximum check. The entire body is read into a single bytes object in memory.
2. Second in-memory copy via multipart parsing (line 169-172):
result = {"fields": {}, "files": {}}
boundary_bytes = f"--{boundary}".encode()
parts = body.split(boundary_bytes)
The _parse_multipart method splits the already-buffered body and stores file contents in a dict, creating additional in-memory copies.
3. Third copy to temp file (line 420-421):
with tempfile.NamedTemporaryFile(suffix=".praison", delete=False) as tmp:
tmp.write(bundle_content)
The bundle content is then written to disk and persisted in the registry, also without size checks.
4. Authentication disabled by default (line 91-94):
def _check_auth(self, headers: Dict[str, str]) -> bool:
if not self.token:
return True # No token configured = no auth
The self.token defaults to None unless PRAISONAI_REGISTRY_TOKEN is set or --token is passed on the CLI.
The entry point is praisonai registry serve (cli/features/registry.py:176), which calls run_server() binding to 127.0.0.1:7777 by default.
In contrast, serve.py (the Starlette server) has RequestSizeLimitMiddleware at line 725-732 enforcing a 10MB default limit. The WSGI server has no equivalent.
PoC
# Start the registry server with default settings (no auth, localhost)
praisonai registry serve &
# Step 1: Create a large bundle (~500MB)
mkdir -p /tmp/dos-test
echo '{"name":"dos","version":"1.0.0"}' > /tmp/dos-test/manifest.json
dd if=/dev/zero of=/tmp/dos-test/pad bs=1M count=500
tar czf /tmp/dos-bundle.praison -C /tmp/dos-test .
# Step 2: Upload — server buffers ~500MB into RAM with no limit
curl -X POST http://127.0.0.1:7777/v1/recipes/dos/1.0.0 \
-F 'bundle=@/tmp/dos-bundle.praison' -F 'force=true'
# Step 3: Repeat to exhaust memory
for v in 1.0.{1..10}; do
curl -X POST http://127.0.0.1:7777/v1/recipes/dos/$v \
-F 'bundle=@/tmp/dos-bundle.praison' &
done
# Server process will be OOM-killed
Impact
- Memory exhaustion: A single large request can consume all available memory, crashing the server process (and potentially other processes via OOM killer).
- Disk exhaustion: Repeated uploads persist bundles to disk at
~/.praison/registry/with no quota, potentially filling the filesystem. - No authentication barrier: Default configuration requires no token, so any local process (including via SSRF from other services on the same host) can trigger this.
- Availability impact: The registry server becomes unavailable, blocking recipe publish/download operations.
The default bind address of 127.0.0.1 limits exploitability to local attackers or SSRF scenarios. If a user binds to 0.0.0.0 (common for shared environments or containers), the attack surface extends to the network.
Recommended Fix
Add a request size limit to the WSGI application, consistent with serve.py's 10MB default:
# In create_wsgi_app(), before reading the body:
MAX_REQUEST_SIZE = 10 * 1024 * 1024 # 10MB, matching serve.py
def…
- Record
GHSA-2xgv-5cv2-47vv- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-770
- Updated
- 2026-11-02
NVD
6.2
PraisonAI is a multi-agent teams system. Prior to 4.5.128, the WSGI-based recipe registry server (server.py) reads the entire HTTP request body into memory based on the client-supplied Content-Length header with no upper bound. Combined with authentication being disabled by default (no token configured), any local process can send arbitrarily large POST requests to exhaust server memory and cause a denial of service. The Starlette-based server (serve.py) has RequestSizeLimitMiddleware with a 10MB limit, but the WSGI server lacks any equivalent protection. This vulnerability is fixed in 4.5.128.
- Record
CVE-2026-40115- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-770
- Updated
- 2026-11-02
OSV
6.2
PraisonAI has an Unrestricted Upload Size in WSGI Recipe Registry Server Enables Memory Exhaustion DoS
PraisonAI is a multi-agent teams system. Prior to 4.5.128, the WSGI-based recipe registry server (server.py) reads the entire HTTP request body into memory based on the client-supplied Content-Length header with no upper bound. Combined with authentication being disabled by default (no token configured), any local process can send arbitrarily large POST requests to exhaust server memory and cause a denial of service. The Starlette-based server (serve.py) has RequestSizeLimitMiddleware with a 10MB limit, but the WSGI server lacks any equivalent protection. This vulnerability is fixed in 4.5.128.
- Record
CVE-2026-40115- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-770
- Updated
- 2026-11-02
OSVGHSA-2xgv-5cv2-47vv
6.2
PraisonAI has Unrestricted Upload Size in WSGI Recipe Registry Server that Enables Memory Exhaustion DoS
Summary
The WSGI-based recipe registry server (server.py) reads the entire HTTP request body into memory based on the client-supplied Content-Length header with no upper bound. Combined with authentication being disabled by default (no token configured), any local process can send arbitrarily large POST requests to exhaust server memory and cause a denial of service. The Starlette-based server (serve.py) has RequestSizeLimitMiddleware with a 10MB limit, but the WSGI server lacks any equivalent protection.
Details
The vulnerable code path in src/praisonai/praisonai/recipe/server.py:
1. No size limit on body read (line 551-555):
content_length = int(environ.get("CONTENT_LENGTH", 0))
body = environ["wsgi.input"].read(content_length) if content_length > 0 else b""
The content_length is taken directly from the HTTP header with no maximum check. The entire body is read into a single bytes object in memory.
2. Second in-memory copy via multipart parsing (line 169-172):
result = {"fields": {}, "files": {}}
boundary_bytes = f"--{boundary}".encode()
parts = body.split(boundary_bytes)
The _parse_multipart method splits the already-buffered body and stores file contents in a dict, creating additional in-memory copies.
3. Third copy to temp file (line 420-421):
with tempfile.NamedTemporaryFile(suffix=".praison", delete=False) as tmp:
tmp.write(bundle_content)
The bundle content is then written to disk and persisted in the registry, also without size checks.
4. Authentication disabled by default (line 91-94):
def _check_auth(self, headers: Dict[str, str]) -> bool:
if not self.token:
return True # No token configured = no auth
The self.token defaults to None unless PRAISONAI_REGISTRY_TOKEN is set or --token is passed on the CLI.
The entry point is praisonai registry serve (cli/features/registry.py:176), which calls run_server() binding to 127.0.0.1:7777 by default.
In contrast, serve.py (the Starlette server) has RequestSizeLimitMiddleware at line 725-732 enforcing a 10MB default limit. The WSGI server has no equivalent.
PoC
# Start the registry server with default settings (no auth, localhost)
praisonai registry serve &
# Step 1: Create a large bundle (~500MB)
mkdir -p /tmp/dos-test
echo '{"name":"dos","version":"1.0.0"}' > /tmp/dos-test/manifest.json
dd if=/dev/zero of=/tmp/dos-test/pad bs=1M count=500
tar czf /tmp/dos-bundle.praison -C /tmp/dos-test .
# Step 2: Upload — server buffers ~500MB into RAM with no limit
curl -X POST http://127.0.0.1:7777/v1/recipes/dos/1.0.0 \
-F 'bundle=@/tmp/dos-bundle.praison' -F 'force=true'
# Step 3: Repeat to exhaust memory
for v in 1.0.{1..10}; do
curl -X POST http://127.0.0.1:7777/v1/recipes/dos/$v \
-F 'bundle=@/tmp/dos-bundle.praison' &
done
# Server process will be OOM-killed
Impact
- Memory exhaustion: A single large request can consume all available memory, crashing the server process (and potentially other processes via OOM killer).
- Disk exhaustion: Repeated uploads persist bundles to disk at
~/.praison/registry/with no quota, potentially filling the filesystem. - No authentication barrier: Default configuration requires no token, so any local process (including via SSRF from other services on the same host) can trigger this.
- Availability impact: The registry server becomes unavailable, blocking recipe publish/download operations.
The default bind address of 127.0.0.1 limits exploitability to local attackers or SSRF scenarios. If a user binds to 0.0.0.0 (common for shared environments or containers), the attack surface extends to the network.
Recommended Fix
Add a request size limit to the WSGI application, consistent with serve.py's 10MB default:
# In create_wsgi_app(), before reading the body:
MAX_REQUEST_SIZE = 10 * 1024 * 1024 # 10MB, matching serve.py
def…
- Record
GHSA-2xgv-5cv2-47vv- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-770
- Updated
- 2026-11-02
OSVPYSEC-2026-2896
6.2
PraisonAI has Unrestricted Upload Size in WSGI Recipe Registry Server that Enables Memory Exhaustion DoS
Summary
The WSGI-based recipe registry server (server.py) reads the entire HTTP request body into memory based on the client-supplied Content-Length header with no upper bound. Combined with authentication being disabled by default (no token configured), any local process can send arbitrarily large POST requests to exhaust server memory and cause a denial of service. The Starlette-based server (serve.py) has RequestSizeLimitMiddleware with a 10MB limit, but the WSGI server lacks any equivalent protection.
Details
The vulnerable code path in src/praisonai/praisonai/recipe/server.py:
1. No size limit on body read (line 551-555):
content_length = int(environ.get("CONTENT_LENGTH", 0))
body = environ["wsgi.input"].read(content_length) if content_length > 0 else b""
The content_length is taken directly from the HTTP header with no maximum check. The entire body is read into a single bytes object in memory.
2. Second in-memory copy via multipart parsing (line 169-172):
result = {"fields": {}, "files": {}}
boundary_bytes = f"--{boundary}".encode()
parts = body.split(boundary_bytes)
The _parse_multipart method splits the already-buffered body and stores file contents in a dict, creating additional in-memory copies.
3. Third copy to temp file (line 420-421):
with tempfile.NamedTemporaryFile(suffix=".praison", delete=False) as tmp:
tmp.write(bundle_content)
The bundle content is then written to disk and persisted in the registry, also without size checks.
4. Authentication disabled by default (line 91-94):
def _check_auth(self, headers: Dict[str, str]) -> bool:
if not self.token:
return True # No token configured = no auth
The self.token defaults to None unless PRAISONAI_REGISTRY_TOKEN is set or --token is passed on the CLI.
The entry point is praisonai registry serve (cli/features/registry.py:176), which calls run_server() binding to 127.0.0.1:7777 by default.
In contrast, serve.py (the Starlette server) has RequestSizeLimitMiddleware at line 725-732 enforcing a 10MB default limit. The WSGI server has no equivalent.
PoC
# Start the registry server with default settings (no auth, localhost)
praisonai registry serve &
# Step 1: Create a large bundle (~500MB)
mkdir -p /tmp/dos-test
echo '{"name":"dos","version":"1.0.0"}' > /tmp/dos-test/manifest.json
dd if=/dev/zero of=/tmp/dos-test/pad bs=1M count=500
tar czf /tmp/dos-bundle.praison -C /tmp/dos-test .
# Step 2: Upload — server buffers ~500MB into RAM with no limit
curl -X POST http://127.0.0.1:7777/v1/recipes/dos/1.0.0 \
-F 'bundle=@/tmp/dos-bundle.praison' -F 'force=true'
# Step 3: Repeat to exhaust memory
for v in 1.0.{1..10}; do
curl -X POST http://127.0.0.1:7777/v1/recipes/dos/$v \
-F 'bundle=@/tmp/dos-bundle.praison' &
done
# Server process will be OOM-killed
Impact
- Memory exhaustion: A single large request can consume all available memory, crashing the server process (and potentially other processes via OOM killer).
- Disk exhaustion: Repeated uploads persist bundles to disk at
~/.praison/registry/with no quota, potentially filling the filesystem. - No authentication barrier: Default configuration requires no token, so any local process (including via SSRF from other services on the same host) can trigger this.
- Availability impact: The registry server becomes unavailable, blocking recipe publish/download operations.
The default bind address of 127.0.0.1 limits exploitability to local attackers or SSRF scenarios. If a user binds to 0.0.0.0 (common for shared environments or containers), the attack surface extends to the network.
Recommended Fix
Add a request size limit to the WSGI application, consistent with serve.py's 10MB default:
# In create_wsgi_app(), before reading the body:
MAX_REQUEST_SIZE = 10 * 1024 * 1024 # 10MB, matching serve.py
def…
- Record
PYSEC-2026-2896- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
praisonaiPyPI |
before 4.5.128 | 4.5.128 |
praisonaiPyPI |
before 4.5.128, plus listed versions 0.0.10.0.100.0.110.0.120.0.13 Show 45 moreShow less0.0.140.0.150.0.160.0.170.0.180.0.190.0.20.0.200.0.210.0.220.0.230.0.240.0.250.0.260.0.270.0.280.0.290.0.30.0.300.0.310.0.320.0.330.0.340.0.350.0.360.0.370.0.380.0.390.0.40.0.400.0.410.0.420.0.430.0.440.0.450.0.460.0.470.0.480.0.490.0.50.0.500.0.520.0.530.0.540.0.55 |
4.5.128 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-40115 is a medium vulnerability (CVSS 6.2) in Mervinpraison Praisonai, published April 9, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.35%, the 28th percentile. Fixed in praisonai 4.5.128.
References
github.com/MervinPraison/PraisonAI/security/advisories/GHSA-2xgv-5cv2-47vv
nvd.nist.gov/vuln/detail/CVE-2026-40115
github.com/MervinPraison/PraisonAI/releases/tag/v4.5.128
github.com/advisories/GHSA-2xgv-5cv2-47vv
github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40115.json
github.com/MervinPraison/PraisonAI
pypi.org/project/praisonai
Left out here: 635 versions and the rest of 3 source descriptions. The JSON record has them.