The Attack Agent tested the Multi-tenant SaaS test app.
15 Nov 2026 · 17 bugs found.
Export takes the tenant from the request body, leaking another tenant's secret.
High risk · Found.
What the agent found
The export API lets the caller name the workspace in the JSON body. The server checks only that the workspace exists, not that the caller belongs to it, so a tenant-a user can export as tenant-b and read tenant-b's workspace secret (FLAG{…}).
Where
/projects/p-a1/export
How the agent showed it
Sign in as the tenant-a test account (alice). POST /projects/p-a1/export with headers Content-Type: application/json and X-Share-Token: [redacted] and body {"workspace":"tenant-b"}. Then GET /exports/<returned id>: the content contains workspace,tenant-b and secret,FLAG{…}. Repeat without the workspace field and it contains secret,a-confidential.Evidence
Signed in as alice (tenant-a): POST /projects/p-a1/export with X-Share-Token: [redacted] and body {"workspace":"tenant-b"} -> 202 {"id":"eed18bbc...","status":"queued"}. GET /exports/eed18bbc... -> "workspace": "tenant-b", content line "secret,FLAG{…}". The same export without the field gives "workspace": "tenant-a" and "secret,a-confidential". Signed in as bob (tenant-b), his own export shows the identical "secret,FLAG{…}", proving that value is tenant-b's.How to fix it
Do not trust the body's workspace for authorization: export in the session's tenant, or reject a workspace the signed-in user is not a member of. Only let the body select among workspaces the user belongs to.
Export checks the share token but not the caller's tenant, and the tokens are guessable.
Medium risk · Found.
What the agent found
POST /projects/<id>/export only checks that X-Share-Token equals the project's share string; it never checks that the project belongs to the caller's workspace. Project ids are sequential (p-a1, p-b1) and the share token is just "share-" plus the same suffix, so a tenant-a user can export tenant-b's project by guessing p-b1/share-b1.
Where
/projects/p-b1/export
How the agent showed it
As alice, POST /projects/p-b1/export with X-Share-Token: [redacted] -> 202; GET /exports/<id> returns the Board pack metrics although p-b1 is not in alice's /projects. Sign in as bob and GET /projects to confirm p-b1/share-b1 is his.
Evidence
As alice (tenant-a, whose /projects lists only p-a1 and p-a2): POST /projects/p-b1/export with X-Share-Token: [redacted] -> 202. GET /exports/a6dbfb4f... -> content "project,Board pack\nmetric,value\nARR,4800000\nchurn,1.8" plus "workspace,tenant-a" and "secret,a-confidential". Bob's /projects returns exactly {"id":"p-b1","name":"Board pack","share":"share-b1"}, so the rows are tenant-b's project data and the workspace/secret lines were stamped with the caller's tenant instead.How to fix it
Verify the project's workspace against the session workspace in the export handler (allow an explicit share capability only when intended). If share tokens are meant to be secrets, make them random rather than derived from the sequential project id.
Session cookie is not marked Secure or SameSite.
Low risk · Found.
What the agent found
The sid cookie is HttpOnly but lacks Secure and SameSite, so it can travel over plain HTTP and is sent on some cross-site navigation.
Where
/login
How the agent showed it
Sign in and inspect the Set-Cookie header on the /login response.
Evidence
POST /login -> set-cookie: sid=<redacted>; HttpOnly; Path=/ (no Secure, no SameSite).
How to fix it
Add Secure and SameSite=Lax (or Strict) to the session cookie.
No security headers beyond HSTS and no cache control on private JSON.
Low risk · Found.
What the agent found
Responses carry only Strict-Transport-Security and x-trace-id: no CSP, X-Content-Type-Options, X-Frame-Options, Referrer-Policy, and no Cache-Control on tenant data such as /projects and /exports/<id>.
Where
/projects
How the agent showed it
Sign in and request /projects; inspect the response headers.
Evidence
GET /projects (signed in) -> 200 with headers content-type: application/json, strict-transport-security, x-trace-id only; no cache-control. Same for GET /exports/<id>.
How to fix it
Add X-Content-Type-Options: nosniff, a minimal Content-Security-Policy, X-Frame-Options/frame-ancestors and Referrer-Policy; add Cache-Control: no-store to authenticated JSON responses.
Session cookie is set without the Secure (or SameSite) flag.
Low risk · Found.
What the agent found
The sid session cookie is HttpOnly but has no Secure and no SameSite attribute, so the browser may send it over a plain-http request and will attach it to cross-site navigations.
Where
/login
How the agent showed it
POST /login with {"username":"<test user>","password":"<test password>"} and Content-Type: application/json; inspect the Set-Cookie response header. Do not print the cookie value.Evidence
POST /login (valid test account) -> 200, header: set-cookie: sid=<32 hex>; HttpOnly; Path=/ (no Secure, no SameSite). The same Set-Cookie shape is returned on first sign-in and after re-login.
How to fix it
Set the cookie as sid=...; HttpOnly; Secure; SameSite=Lax; Path=/ (the site is HTTPS-only and HSTS-preloaded, so Secure costs nothing).
No sign-out route: sessions cannot be revoked.
Low risk · Found.
What the agent found
There is no /logout endpoint (GET or POST); the only way to end a session is to close the browser or discard the cookie client-side, and a copied sid stays valid.
Where
/logout
How the agent showed it
Sign in twice, keep both sid values, then send the older sid to GET /me: it still returns 200. GET/POST /logout both return 404.
Evidence
GET /logout with a valid session -> 404 {"error": "not found"}; POST /logout -> 404. After a second sign-in issued a new sid, the first sid still returned 200 {"username":"alice","tenant":"tenant-a"} on GET /me.How to fix it
Add POST /logout that deletes the server-side session for the presented sid, expires the cookie (Max-Age=0; Secure; HttpOnly; SameSite=Lax) and returns 204/200.
Authenticated JSON responses have no Cache-Control or Vary: Cookie.
Low risk · Found.
What the agent found
Per-user JSON (/me, /projects, /exports/<id>) is returned with no Cache-Control and no Vary: Cookie, so an intermediary cache that decides to store a 200 GET could serve one user's data to another.
Where
/me
How the agent showed it
Sign in, GET /me and GET /projects, inspect response headers for cache-control/vary.
Evidence
GET /me with a valid session -> 200 with headers: content-type: application/json, server, strict-transport-security, x-trace-id; no cache-control, no vary, no etag, no expires. Same for GET /projects.
How to fix it
Send Cache-Control: private, no-store (or at least private, max-age=0, must-revalidate) and Vary: Cookie on every authenticated JSON response.
Only HSTS is sent; no CSP, frame, referrer, permissions or nosniff headers.
Low risk · Found.
What the agent found
Responses carry strict-transport-security but no Content-Security-Policy, X-Frame-Options/frame-ancestors, Referrer-Policy, Permissions-Policy or X-Content-Type-Options, so the default browser protections are left to chance.
Where
/
How the agent showed it
Fetch any page signed out or signed in and read the response headers.
Evidence
GET / and GET /me -> headers: strict-transport-security: max-age=63072000; includeSubDomains; preload, content-type, server, x-trace-id only. No content-security-policy / x-frame-options / referrer-policy / permissions-policy / x-content-type-options.
How to fix it
Add Content-Security-Policy: default-src 'none'; frame-ancestors 'none' (adjust for the static HTML page), X-Content-Type-Options: nosniff, Referrer-Policy: no-referrer, Permissions-Policy: geolocation=(), camera=(), microphone=().
HEAD and OPTIONS return 501.
Note · Found.
What the agent found
HEAD /health and OPTIONS answer 501 while GET /health answers 200, so HEAD-based uptime checks see the site as down and CORS preflights cannot succeed.
Where
/health
How the agent showed it
curl -I https://<site>/health and curl -X OPTIONS https://<site>/projects.
Evidence
GET /health -> 200 {"ok": true}; HEAD /health -> 501; OPTIONS /projects -> 501.How to fix it
Answer HEAD with the same status/headers as GET and handle OPTIONS (or return 204).
There is no logout and sessions are never revoked.
Note · Found.
What the agent found
GET and POST /logout both return 404; signing in again issues a new sid but the old sid keeps working, so sessions never end server-side.
Where
/logout
How the agent showed it
Sign in, keep the cookie, sign in again, then request /me with the first cookie.
Evidence
GET /logout -> 404 {"error": "not found"}; after a second sign-in the old sid still returns 200 on /me.How to fix it
Add POST /logout that deletes the server-side session and clears the cookie; expire idle sessions.
Signed-out requests get 401 for every path, hiding robots.txt and favicon.
Note · Found.
What the agent found
When signed out, unknown paths and public files all return 401 {"error": "sign in"}; signed in they return 404. /robots.txt and /favicon.ico are therefore behind the login.
Where
/robots.txt
How the agent showed it
Request /robots.txt and /nope with and without a session cookie.
Evidence
Signed out: GET /robots.txt -> 401, GET /favicon.ico -> 401, GET /nope -> 401. Signed in: GET /nope -> 404 {"error": "not found"}.How to fix it
Serve static/public paths before the auth guard and return 404 for unknown paths regardless of session.
Version banner reveals TenantReports/1.0 and Python 3.14.10; no applicable CVE found.
Note · Found.
What the agent found
The server header advertises the app and Python version. The known Python 3.14 issues are tarfile extraction bugs, which this tiny JSON API does not use, so nothing applies.
Where
/
How the agent showed it
curl -sI https://<site>/ and read the server header.
Evidence
server: TenantReports/1.0 Python/3.14.10 on every response.
How to fix it
Optional: trim the banner to the product name.
No request size limit on JSON bodies.
Note · Found.
What the agent found
A 1 MB JSON body to /login is accepted and processed (200), so request size is only bounded by the platform.
Where
/login
How the agent showed it
Send a large JSON body to /login.
Evidence
POST /login with a 1,000,000-byte pad field -> 200 {"ok": true, "username": "alice"}.How to fix it
Cap the body size and return 413 above it.
HEAD, OPTIONS, PUT/PATCH/DELETE answer 501; OPTIONS preflight fails.
Note · Found.
What the agent found
The server implements only GET and POST. HEAD /health returns 501 while GET /health is 200, so uptime checks that use HEAD report the site as down; OPTIONS also returns 501, so any cross-origin JSON request that triggers a preflight would fail.
Where
/health
How the agent showed it
curl -I https://<host>/health and curl -X OPTIONS https://<host>/projects.
Evidence
HEAD /health -> HTTP/2 501 (text/html BaseHTTPRequestHandler error page); GET /health -> 200 {"ok": true}. OPTIONS /projects -> 501. PUT /me -> 501.How to fix it
Implement do_HEAD as do_GET without the body, and answer OPTIONS (204 with an Allow header, plus CORS headers if the API is to be used cross-origin).
Unknown paths return 401 "sign in" when anonymous; robots.txt/favicon not served.
Note · Found.
What the agent found
The auth guard runs before routing, so every unknown path answers 401 {"error": "sign in"} to an anonymous caller and 404 only after sign-in. /robots.txt and /favicon.ico are not public files: 401 anonymous, 404 signed in.
Where
/robots.txt
How the agent showed it
Request /robots.txt and /favicon.ico with and without a session cookie.
Evidence
GET /robots.txt (no cookie) -> 401 {"error": "sign in"}; GET /robots.txt (signed in) -> 404 {"error": "not found"}; same for /favicon.ico. GET /nonsense signed in -> 404.How to fix it
Route first and return 404 for unknown paths, then apply the auth guard; serve robots.txt and favicon.ico from the public path list.
Banner discloses TenantReports/1.0 and Python/3.14.10.
Note · Found.
What the agent found
Every response includes server: TenantReports/1.0 Python/3.14.10, revealing the framework and interpreter version. No known CVE applies to Python 3.14.10 here: the 2025 tarfile filter CVEs are irrelevant (no tar upload) and the aiohttp smuggling CVE is irrelevant (pure stdlib http.server).
Where
/
How the agent showed it
Any request, read the Server header.
Evidence
Response header on /, /login, /health: server: TenantReports/1.0 Python/3.14.10. PoC Index search "Python 3.14" returned CVE-2025-4138 / CVE-2025-4517 (tarfile extraction) and CVE-2026-69243 (aiohttp) - none used by this app.
How to fix it
Optional: send a fixed product banner without the interpreter version.
Malformed or oversized login body is reported as "bad credentials".
Note · Found.
What the agent found
The login handler ignores Content-Type and answers 401 {"error": "bad credentials"} for malformed JSON, a body over ~1 MB and a form-encoded body with correct credentials, instead of 400/413. Client bugs therefore look like wrong passwords.
Where
/login
How the agent showed it
POST /login with body '{bad' or a 1.1 MB JSON object and compare with a valid JSON sign-in.Evidence
POST /login Content-Type: application/json body '{bad' -> 401 {"error": "bad credentials"}; body 'null' -> 401; 1.1 MB JSON body -> 401; application/x-www-form-urlencoded username=...&password=... -> 401. GET /health stayed 200 (no crash).How to fix it
Return 400 for unparsable/non-object JSON and 413 for a body over the limit; accept or reject non-JSON Content-Type explicitly.
Open the screenshot