October 7, 2026
NO AI, How I Exposed a Database Without Injecting Anything
Hey friends, In this article/write-up I’ll be sharing with you how I was able to find a very stupid vulnerability that exposed database…
By OctaYus
1 min read
Hey friends, In this article/write-up I'll be sharing with you how I was able to find a very stupid vulnerability that exposed database tables, ORM details and the logic behind the data base itself just be sending the same request twice.
Summary:
- So, I was hunting on an application that allows users to create ai agents and chat with them and the issues was when a user repeats the same requests that allows them to create ai agent the whole application returns all the database tables and data types for some reason i don't even know why myself so without further ado here's the steps to reproduce.
Steps to reproduce & PoC:
Phase 1: Account Setup (Prerequisites)
- Sign up for account
- Now send it twice and obtain the error that exposes the database tables
First Request (Successful Creation):
POST /api/v1/create_agent HTTP/2
Host:
Authorization: Token
Content-Type: application/json
{
"title": "My Assistant",
"name": "Assistant",
etc..
}POST /api/v1/create_agent HTTP/2
Host:
Authorization: Token
Content-Type: application/json
{
"title": "My Assistant",
"name": "Assistant",
etc..
}Normal Response:
HTTP/2 200 OK
{
"success": true,
"agent": {
"I don't think I should be showing this in the writeup tho"
}
}HTTP/2 200 OK
{
"success": true,
"agent": {
"I don't think I should be showing this in the writeup tho"
}
}-
Trigger Vulnerability (Send Duplicate Request):
-
Vulnerable Response:
{
"operation": "member_provision",
"trace_id": "00000000-0000-0000-0000-000000000000",
"detail": "(psycopg.errors.UniqueViolation) duplicate key value violates unique constraint \"accounts_member_handle_key\"\nDETAIL: Key (handle)=(org_ref:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa) already exists.\n[SQL: INSERT INTO accounts_member (secret_hash, last_seen, is_owner, handle, display_name, surname, contact_address, is_operator, enabled, created_at) VALUES (%(secret_hash)s::VARCHAR, %(last_seen)s::TIMESTAMP WITHOUT TIME ZONE, %(is_owner)s, %(handle)s::VARCHAR, %(display_name)s::VARCHAR, %(surname)s::VARCHAR, %(contact_address)s::VARCHAR, %(is_operator)s, %(enabled)s, %(created_at)s::TIMESTAMP WITHOUT TIME ZONE) RETURNING accounts_member.id]\n[parameters: {'secret_hash': '', 'last_seen': None, 'is_owner': False, 'handle': 'org_ref:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', 'display_name': 'demo', 'surname': '', 'contact_address': '', 'is_operator': False, 'enabled': True, 'created_at': datetime.datetime(2025, 1, 1, 0, 0, 0, 0, tzinfo=datetime.timezone.utc)}]\n(Background on this error at: )",
"status": 500,
"reason": null,
"backoff_seconds": null
}{
"operation": "member_provision",
"trace_id": "00000000-0000-0000-0000-000000000000",
"detail": "(psycopg.errors.UniqueViolation) duplicate key value violates unique constraint \"accounts_member_handle_key\"\nDETAIL: Key (handle)=(org_ref:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa) already exists.\n[SQL: INSERT INTO accounts_member (secret_hash, last_seen, is_owner, handle, display_name, surname, contact_address, is_operator, enabled, created_at) VALUES (%(secret_hash)s::VARCHAR, %(last_seen)s::TIMESTAMP WITHOUT TIME ZONE, %(is_owner)s, %(handle)s::VARCHAR, %(display_name)s::VARCHAR, %(surname)s::VARCHAR, %(contact_address)s::VARCHAR, %(is_operator)s, %(enabled)s, %(created_at)s::TIMESTAMP WITHOUT TIME ZONE) RETURNING accounts_member.id]\n[parameters: {'secret_hash': '', 'last_seen': None, 'is_owner': False, 'handle': 'org_ref:aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', 'display_name': 'demo', 'surname': '', 'contact_address': '', 'is_operator': False, 'enabled': True, 'created_at': datetime.datetime(2025, 1, 1, 0, 0, 0, 0, tzinfo=datetime.timezone.utc)}]\n(Background on this error at: )",
"status": 500,
"reason": null,
"backoff_seconds": null
}The report was marked as LOW and rewarded which is better than nothing.
And yeah that was for today's write-up, follow, share and stay tuned for the next ones.
My website: octayus.com
Contact email: octayus@gmail.com or octayus@octayus.com
No AI was used in writing this writeup obviously so yeah cya.