Skip to content
SQL injection Disclosed report Advanced

SQL Injection in HEASARC TAP ADQL Endpoint via PostgreSQL Unicode Escape — Full pg_catalog Bypass

The ADQL-to-SQL translation layer on a NASA astronomy archive's TAP endpoint passed user-supplied queries to PostgreSQL without proper sanitisation, so Unicode escape sequences could smuggle a quote past quote-based filters. An unauthenticated attacker could then read database metadata, schema structure and table and column names.

azeemakhtar4e8764 Follow

Originally disclosed on Bugcrowd

  • Accepted in 7 hours
  • Fixed in 56 days
  • Disclosed after 2 months

Summary by azeemakhtar4e8764

NASA HEASARC TAP/ADQL SQL Injection via PostgreSQL Unicode Escape

Target: heasarc.gsfc.nasa.gov/xamin/vo/tap/sync Severity: P3 | CVSS: Medium Status: Patched & Verified (August 10, 2026)

Summary

The NASA HEASARC X-ray Astronomy Archive TAP (Table Access Protocol) endpoint was vulnerable to SQL injection via PostgreSQL Unicode escape sequences. By supplying ADQL queries containing U&'\0027' (Unicode representation of a single quote) and U&"\0070..." encoded identifiers, the ADQL-to-SQL translation layer passed unsanitized input directly to the PostgreSQL backend, bypassing standard quote-based input filters.

Impact

An unauthenticated attacker could enumerate full database metadata, schema structure, and table/column names from the HEASARC archive database without valid credentials.

Technique

The vulnerability exists at the ADQL query translation layer — where ADQL syntax is converted to SQL via string operations rather than parameterized binding — making it distinct from standard ORM-protected endpoints.

Resolution

NASA patched the ADQL query preprocessor to reject Unicode escape sequences. All U& vectors now return a syntax error at the preprocessor level. Schema catalog access is additionally blocked.

The original report as published on Bugcrowd, by azeemakhtar4e8764. Images and videos are our own copies; raw HTML is shown as text. View it on Bugcrowd.

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

How it worked

Root cause

Likely the ADQL preprocessor built SQL by string concatenation rather than parameterised binding, and it did not decode or reject PostgreSQL Unicode escape sequences before the quote filter ran.

Impact

An unauthenticated attacker could enumerate database metadata, schema structure and table and column names; the text does not claim access to actual archive data.

What the attacker needed

No account needed; network access to the TAP endpoint

The fix

The ADQL preprocessor was patched to reject Unicode escape sequences and schema catalog access was blocked, and the text says this was verified.

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 report has not been written yet. The Original tab links to the source.

This service lets astronomers send queries in a simple query language, which the server translates into database commands. The translation glued the user's text straight into the database command instead of keeping it separate, so special encoded characters could break out and add extra database commands. That let someone with no account list the database's internal structure, though the write-up does not show them reading actual data.

What is SQL injection?

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.

More from National Aeronautics and Space Administration (NASA) - Vulnerability Disclosure Program

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

SQL injection

The lesson behind this report.

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.