Skip to content
Info disclosure Write-up Intermediate

how i made easy information disclosure bugs in graphql

The author claims that GraphQL APIs using Node.js and PostgreSQL are vulnerable by default to 'null byte injection', where adding a null byte to a string causes database errors that reveal the underlying SQL query. This information disclosure could help attackers identify SQL injection points and potentially escalate to remote code execution.

eyaalgabay Follow

Published on medium.com

this is a way to find easy information disclosure bugs in any graphql api that uses postgresql database

EyalSec, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely, the application does not properly handle null bytes in input, causing database errors that are returned to the user with full query details.

Impact

An attacker could obtain database query details, which may reveal SQL injection vulnerabilities and potentially lead to full remote code execution.

What the attacker needed

GraphQL API using Node.js and PostgreSQL

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This post describes a technique where sending a special character (a null byte) to a GraphQL API can cause the server to return database error messages. Those errors may show the exact SQL query being run, which helps an attacker understand how the database is structured and whether the input is safely handled. The author claims this works by default on many Node.js and PostgreSQL setups.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by eyaalgabay

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.