#066Technical3 min

Spot unauthorized database access

Recognize overly broad database permissions without confusing a risky setting with proof that someone accessed your records.

Hackaiz team · updated 21/11/2026

Illustration: an engineer works next to servers.
Illustration: an engineer works next to servers. Illustrative photo, not a screenshot.

01Distinguish an access risk from an intrusion

Hackaiz can inspect a connected PostgreSQL or MySQL database for account, permission and server settings that could allow unintended access. This is a configuration check, not an investigation of who opened a customer record. The live audit asks questions about database metadata, meaning descriptions of objects and rights. It does not read the contents of your application tables.

For example, a shared database role may be able to read a table intended for one customer only. That deserves investigation even when no misuse is known. Conversely, a report without findings does not prove that every request from your application correctly checks the signed-in user. Keep database permissions and application authorization as two separate questions.

02Connect the database you actually use

Open the database selection flow from Connect. The dialog is called “Choose a database” and includes “Live Postgres and MySQL”. Select “PostgreSQL” or “MySQL / MariaDB” to match the server. Prepare a dedicated read-only account rather than copying an administrator credential from your application configuration.

The connection address includes credentials and must remain private. Hackaiz encrypts the saved address and does not display it back to you. The ownership checkbox is an authorization statement for this database, not permission to examine an unrelated server. A private-network target cannot be reached through this live connection flow.

  1. 1Enter the database connection address in the password-style field.
  2. 2Confirm “I own this database and allow Hackaiz to check it.”, then choose “Save”.
  3. 3Use “Select” when the database is being added to an analysis. Review the chosen target before starting.

03Interpret concrete permission warnings

On PostgreSQL, the check for a table without row protection looks for a table with row-level security disabled and a read grant to a role other than its owner. Row-level security restricts which rows a role can use. A finding on an orders table is a prompt to review the role and the intended customer boundary, not proof that another customer has downloaded those orders. Grants to PUBLIC are another signal: PUBLIC is the group covering every database role, not merely a role named after your application.

On MySQL, anonymous accounts, accounts without passwords and account hosts such as % are access concerns. A wildcard host means the account can be used from any host allowed by the surrounding network rules; it does not establish that the database is reachable from the whole Internet. Server-wide privileges on an application account can also give that account more power than its task requires. Assess the account, host restriction and privileges together.

04Turn the result into a controlled review

Read the named database object and explanation before deciding on a change. Reports use Danger, To fix and To watch to help organize attention. Ask the database owner which application needs the permission and whether a narrower role would serve the same purpose. Prepare and test permission changes with that owner: removing a shared grant without checking dependencies can stop legitimate application requests.

Pay attention to the number of checks not run. A read-only account may be unable to inspect protected account metadata. That is a visibility limit, not evidence that those accounts are safe. Do not grant broad administrator privileges simply to remove that warning. This check uses credits; plan a focused follow-up after an approved change rather than treating repeated runs as free. “Remove access” disconnects the saved database connection, but does not replace revoking credentials at the database when needed.

Frequently asked questions

Was this article helpful?

Related articles