Skip to content
SQL injection Write-up Intermediate

From a Password Reset Form to Unauthenticated Database Access

The email parameter of an unauthenticated Joomla password-reset endpoint was concatenated into a SQL query, allowing boolean-based blind SQL injection. An attacker could extract database values, including a Joomla Super User credential record, without authentication.

redhunter01 Follow

Published on medium.com

Bug Bounty

redhunter01, 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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 11 min read.

Context

The target was a Joomla-based application running the ChronoForms V4 component. The feature under test was a password-reset form, which performs a lookup based on an email address supplied by the visitor. The endpoint was:

HTTP
POST /index.php?option=com_chronoforms&chronoform=reset_password&event=submit

The parameter of interest was email. The workflow required no authentication, which made any backend injection behind it considerably more interesting.

Password-reset functionality is a good place to look because it commonly runs database queries against attacker-controlled identifiers such as email, username, account ID or token. That makes these endpoints worth testing for SQL injection, account and user enumeration, authentication bypass, parameter pollution, rate-limit issues, CSRF problems and logic flaws.

Setup

The application was a production Joomla installation. The report identifies the stack as Joomla 3.x with ChronoForms V4, and notes that ChronoForms V4 is end-of-life. A WAF sat in front of the application. No accounts, roles or tooling beyond that are described.

Finding it

The starting point was the data flow rather than a payload. Conceptually the endpoint appeared to do something like this:

Text
POST email
     ↓
ChronoForms
     ↓
Password reset handler
     ↓
Database query
     ↓
WHERE email = '<input>'
     ↓
Result

The dangerous pattern is string concatenation:

Text
"WHERE email = '" + user_input + "'"

instead of a bound parameter:

Text
"WHERE email = ?"

The distinction is fundamental. When input is concatenated directly into a statement, the database, not the application, ends up interpreting parts of that input as SQL syntax. The report identifies the vulnerable flow as the email parameter being incorporated into a WHERE email='<input>' condition.

A suspicious payload is not a finding on its own, and neither is a payload that merely appears to change something. A strong SQL injection finding should answer several questions:

  1. Is the input actually reaching a SQL query?
  2. Can TRUE be reliably distinguished from FALSE?
  3. Is the response difference caused by the database?
  4. Can a real database-backed value be extracted?
  5. Is authentication required?
  6. What is the actual impact?
  7. Can that impact be demonstrated without unnecessarily damaging or accessing sensitive data?
  8. Is the asset actually in scope?

The investigation followed a deliberate progression, each step increasing confidence and eliminating alternative explanations:

Text
Input reflection
     ↓
Syntax manipulation
     ↓
Boolean behavior
     ↓
Error behavior
     ↓
Database fingerprint
     ↓
Data extraction

Exploitation

Step 1: Build a boolean oracle

The most important discovery was a reliable difference between two conditions. Conceptually, the injected query created a conditional expression: when the condition was TRUE the query produced a valid scalar result and the application returned its normal response; when the condition was FALSE the query produced deliberately invalid scalar behaviour, the database raised an error, and the application responded differently.

That gives a binary oracle:

Text
TRUE  → Response A
FALSE → Response B

The test established the following mapping:

Condition Result
TRUE HTTP 200
FALSE HTTP 302

The TRUE response contained the normal "not in the system" behaviour, while the FALSE branch produced a redirect caused by the database error. This was the turning point: the parameter was no longer merely suspicious, it was a working SQL execution oracle.

Step 2: Understand what the oracle buys you

Suppose the database holds a value such as:

Text
secret = "8.4.8"

You cannot see it directly, but you can ask whether the first character is 8. With TRUE mapping to HTTP 200 and FALSE to HTTP 302, the application becomes a communication channel. You then ask whether character 1 is A, B, C and so on, then whether character 2 is A, B, C, and eventually reconstruct 8.4.8. This is the essence of blind SQL injection: the application does not return the value, it returns a signal telling you whether your question was true.

Step 3: Prove the database is the source of the signal

A WAF sat in front of the application, which raises an obvious question: could the different responses simply be caused by the WAF? A weak report would say that payload A gives 200 and payload B gives 302, therefore SQL injection. A stronger investigation asks which component is actually generating the difference.

The investigation compared two situations. A UNION SELECT appearing inside a SQL comment passed through the WAF. Meanwhile, a live SQL expression containing the same general SQL constructs produced the different application response. The response differential tracked whether the SQL expression was actually executed, not simply whether certain keywords appeared in the HTTP request.

The request path to reason about is:

Text
Request
   │
   ▼
 WAF
   │
   ▼
Web application
   │
   ▼
Database

When debugging a suspected injection, determine which layer produced the observable difference. Possible sources include the WAF, a reverse proxy, application validation, a framework exception, a database error or an application redirect. Do not confuse them.

Step 4: Fingerprint the database

With a stable oracle, the next objective was to extract a harmless piece of information. A database version is ideal because it proves that SQL is executing, that attacker-controlled expressions are evaluated, that database functions can be invoked and that information can be extracted, without immediately dumping application data.

The investigation tested the first character of the database version and established MySQL 8.x through the injection itself. That is much stronger evidence than identifying MySQL from headers or technology fingerprints: it is database-backed proof.

Fingerprinting also tells you which syntax and functions are available. MySQL, PostgreSQL, SQL Server, Oracle and SQLite differ in functions, error behaviour, comments, string functions, metadata structures, syntax and conditional expressions. If your oracle can distinguish SUBSTRING(...) conditions against a database variable, you have moved beyond generic application behaviour into actual database interaction.

Step 5: The CSRF token was not a security boundary

The endpoint expected a Joomla token, which at first glance might appear to prevent arbitrary requests. Testing showed that the application accepted a token value without actually enforcing the session-bound CSRF relationship expected from a secure implementation. The presence of a CSRF token parameter does not mean CSRF protection exists. A proper mechanism validates that the token belongs to the expected session, is valid, has not expired and is associated with the intended request. Accepting a correctly formatted token is not meaningful protection.

Step 6: Keep the test non-destructive

This was a password-reset endpoint, so a careless test could trigger a password-reset email for a real user. Instead, testing used random non-matching email addresses so that no actual account matched and no password-reset message was dispatched. When testing a vulnerability, choose inputs that prove it while minimising real-world side effects. For SQL injection that means preferring database version, controlled boolean questions and harmless metadata before massive data dumps, destructive queries or account modifications.

Step 7: From oracle to arbitrary reads

Once the version had been extracted character by character, the capabilities of the oracle were clear. The same mechanism could ask arbitrary questions of reachable data: does this table exist, does this row exist, is this character A, is this value longer than 20 characters, does this user have administrative privileges. The attacker controls the question and the HTTP response provides the answer:

Text
Attacker
   │
   │ "Is condition X true?"
   ▼
Application
   │
   ▼
Database
   │
   │ TRUE / FALSE
   ▼
Application response
   │
   ▼
Attacker

That is why a reliable boolean SQL injection should not be underestimated.

Step 8: Escalate carefully

The next stage was to determine whether application-level data could be reached. The investigation confirmed that a Joomla administrator credential record could be located and extracted through the oracle. For a public writeup the report stops at the fact that a Joomla Super User credential record was successfully extracted from the database, without publishing the actual username or password hash. The extracted password material was a bcrypt hash, and a privileged Joomla account existed. That is enough to demonstrate a major escalation path without exposing credential material.

The resulting chain:

Text
Unauthenticated attacker
        │
        ▼
Password reset endpoint
        │
        ▼
SQL injection in email parameter
        │
        ▼
Boolean/error oracle
        │
        ▼
Database fingerprinting
        │
        ▼
Character-by-character extraction
        │
        ▼
Application database access
        │
        ▼
Privileged Joomla credential record
        │
        ▼
Potential administrative compromise

The report separates demonstrated impact from theoretical impact. Demonstrated: unauthenticated SQL execution, a boolean/error oracle, database-backed extraction, MySQL version extraction and Joomla credential record extraction. Potential escalation: recover the credential, authenticate as a privileged user, access the Joomla administrator interface, modify application-controlled content or code, and potentially compromise the server. The second category is an escalation path, not a set of steps that were all performed.

Root cause

The root cause was unsafe construction of the SQL query. Conceptually:

Text
WHERE email = '<attacker-controlled input>'

was built with string concatenation. The secure form is a parameterised query:

Text
WHERE email = ?

with the email supplied separately as a bound parameter. The report identifies parameterisation as the primary remediation.

Escaping the quote is not the ideal fix. The architectural fix is a parameterised query with bound parameters, which changes how the database interprets the input: instead of SQL plus user input, the database receives a statement and separate data. The application should never depend on blacklists, regexes, keyword filtering, WAF signatures or manual quote escaping as its primary defence against SQL injection.

The WAF was an additional layer and did not serve as the security boundary. A WAF is an additional layer and should not be the application's primary defence against injection. The security boundary should be the application issuing parameterised queries, not the hope that a WAF catches SQL keywords. The investigation specifically demonstrated that WAF behaviour and database-generated behaviour could be distinguished.

A related factor is that the affected application used Joomla 3.x and ChronoForms V4, and the report identifies ChronoForms V4 as end-of-life. Old CMS versions, old plugins, old components, EOL frameworks and abandoned libraries are not vulnerabilities by themselves, but they raise testing priority. The workflow is technology fingerprint, version identification, known attack surface, interesting endpoints, then manual validation. Version alone is not a vulnerability.

Impact

The core vulnerability was unauthenticated SQL injection with database read capability. The report characterises the immediate impact as unauthenticated boolean/error-based database reads and the possible escalation as administrative compromise. The severity factors were:

  • No authentication. An attacker did not need an account, session, role or invitation.
  • Production application. The affected endpoint belonged to a live application.
  • Database access. The issue was not a local validation problem; the attacker could interact with the backend database.
  • Sensitive application data. The database contained authentication-related records.
  • Privileged account exposure. A Joomla Super User credential record was successfully recovered.

Recovering the credential and using it to authenticate, reach the administrator interface and modify content or code is presented as a potential escalation, not as something that was carried out.

Fix

The report identifies parameterisation as the root fix and recommends additional defence-in-depth controls. The vulnerability was eventually remediated, but not because of this report: a different report had already triggered remediation that happened to fix this vulnerability as well. The team explained that the earlier report had been submitted roughly a month before and that its remediation eliminated this issue too.

The outcome is worth recording. The asset was ultimately determined to be outside the formally defined program scope, and the report was initially closed as Not Applicable for that reason. Later the team acknowledged the finding was valid and reopened and triaged it. No bounty was awarded; the report received reputation credit.

Technical validity, program eligibility, bounty eligibility, duplicate status and remediation timing are independent dimensions. A real vulnerability with an excellent proof of concept and confirmed remediation can still pay $0 because of program rules or prior remediation. The practical lesson is to verify scope before investing deeply: is the hostname in scope, is the exact asset in scope, is the endpoint in scope, is third-party infrastructure covered, are there special exclusions. A technically critical vulnerability on an out-of-scope asset may produce no bounty. That is a program-selection failure, not a technical one, and scope verification belongs in reconnaissance.

Preserve evidence as soon as an oracle is reliable: the TRUE request and response, the FALSE request and response, database extraction proof, timestamps and the affected endpoint. A vulnerability can disappear during triage, and evidence has to survive the fix. In this case the SQL injection stopped working once unrelated remediation landed.

Variants to test

  1. Other password-reset and account-recovery endpoints. Submit a quote, parentheses and boolean expressions in the email, username or token parameter and compare status, length, body and redirect location against a baseline. A positive result is a repeatable TRUE/FALSE difference that survives repeated runs.
  2. Search, sort, filter and order parameters. These are commonly concatenated into queries. A positive result is a stable response differential that tracks the truth of the injected condition rather than the presence of keywords.
  3. Comment-wrapped keywords versus live expressions. Send a UNION SELECT inside a SQL comment and then a live expression with the same constructs. If the comment passes but the live expression changes the response, the difference is coming from execution, not filtering.
  4. Token parameters on forms that expect CSRF protection. Replay a token without the matching session or with a stale value. A positive result is the request being processed anyway, showing the token is accepted but not enforced.
  5. Version extraction as a harmless proof. Ask for the first character of the database version through the oracle. A positive result is a version string reconstructed character by character, which proves evaluation without touching application data.
  6. EOL components and plugins. Fingerprint the CMS, plugins and components, then validate manually. A positive result is a confirmed injection in an endpoint belonging to an end-of-life component, not merely an old version banner.
  7. Scope checks before exploitation. Confirm the hostname, exact asset, endpoint and any third-party infrastructure against the program rules. A positive result is written confirmation that the asset is in scope, which protects the work from being closed as Not Applicable.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 20 min read.

What happened, in plain words

A security researcher found a way to make a website's password-reset form talk to its database in a way the site's owners never intended. By typing special text into the email field, the researcher could ask the database yes/no questions and get answers back through the website's normal responses. This let them read information from the database without logging in, including a record for a Joomla administrator account. The hole was closed by remediation from another report that happened to fix it too. The asset turned out to be outside the bug bounty program's formal scope, so the researcher received reputation credit but no money. This article walks through the whole investigation from the beginning, explaining every concept as it comes up.

1. The initial attack surface

The target was a website built with Joomla, a popular content management system (CMS) that lets people build and run websites. On top of Joomla, the site used a component called ChronoForms V4, which is a tool for creating forms (like contact forms or password-reset forms) and handling what happens when someone submits them.

The researcher focused on the password-reset form. When you forget your password, you typically enter your email address and the site looks it up in its database to see if an account exists. That lookup is a database query. The endpoint (the specific URL that handles the form submission) was:

HTTP
POST /index.php?option=com_chronoforms&chronoform=reset_password&event=submit

Let's break this down:

  • POST is the HTTP method. When your browser sends data to a server (like submitting a form), it often uses POST. GET is for retrieving a page; POST is for sending data that might change something on the server.
  • /index.php is the main script that Joomla uses to handle requests.
  • ?option=com_chronoforms tells Joomla to load the ChronoForms component.
  • &chronoform=reset_password tells ChronoForms which form to use: the one named reset_password.
  • &event=submit tells ChronoForms that the form has been submitted and it should process it.

The parameter of interest was email. A parameter is a named piece of data sent with a request. In a form, each input field has a name, and when you submit, the browser sends the value you typed under that name. Here, the email you type is sent as the email parameter.

The workflow required no authentication. Authentication is the process of proving who you are, usually by logging in with a username and password. Because the password-reset form is meant for people who are locked out, it has to work without logging in. That means anyone on the internet can send requests to it. If there is a security hole behind it, anyone can exploit it without needing an account.

Password-reset functionality is a good place to look for vulnerabilities because it commonly runs database queries using values that the visitor controls, such as email, username, account ID or token. A token here is a small piece of data, often a random string, used to verify that a request is legitimate. Because these values go into database queries, these endpoints are worth testing for:

  • SQL injection (we'll explain this shortly)
  • account enumeration (finding out which accounts exist)
  • user enumeration (finding out which usernames exist)
  • authentication bypass (getting in without valid credentials)
  • parameter pollution (sending multiple values for the same parameter to confuse the application)
  • rate-limit issues (sending too many requests too quickly)
  • CSRF problems (cross-site request forgery, where another site tricks your browser into making a request)
  • logic flaws (mistakes in how the application decides what to do)

2. Start with the data flow

Before thinking about payloads (the special text you send to try to trigger a vulnerability), the researcher wanted to understand the application's data flow: where the data goes from the moment you type it to the moment it affects the database.

Conceptually, the endpoint appeared to do something like this:

Text
POST email
     ↓
ChronoForms
     ↓
Password reset handler
     ↓
Database query
     ↓
WHERE email = '<input>'
     ↓
Result

Line by line:

  • POST email: the browser sends the email value in a POST request.
  • ChronoForms: the ChronoForms component receives it.
  • Password reset handler: the part of the code that deals with password resets takes over.
  • Database query: it builds a database query to look up the email.
  • WHERE email = '<input>': the query includes a condition that compares the email column to the input. The <input> is replaced with whatever the user typed, and it is wrapped in single quotes because in SQL (the language databases use) text values are written inside quotes.
  • Result: the database returns a result, and the application uses it to decide what to show.

The dangerous pattern is string concatenation:

Text
"WHERE email = '" + user_input + "'"

instead of a bound parameter:

Text
"WHERE email = ?"

String concatenation means gluing pieces of text together to form the query. Here, the code takes the fixed part WHERE email = ', then adds whatever the user typed, then adds a closing '. The problem is that the user's input is treated as part of the SQL code, not as pure data. If the user types a single quote, it can close the string early and let them add their own SQL commands.

A bound parameter (also called a parameterised query) is different. The query is written with a placeholder ?, and the user's input is sent separately. The database knows that the ? is where a value goes, and it treats that value strictly as data, never as SQL code. This is the fundamental distinction: with concatenation, the database interprets parts of the input as SQL syntax; with bound parameters, it does not.

The report identifies the vulnerable flow as the email parameter being incorporated into a WHERE email='<input>' condition.

A suspicious payload is not a finding on its own, and neither is a payload that merely appears to change something. A strong SQL injection finding should answer several questions:

  1. Is the input actually reaching a SQL query?
  2. Can TRUE be reliably distinguished from FALSE?
  3. Is the response difference caused by the database?
  4. Can a real database-backed value be extracted?
  5. Is authentication required?
  6. What is the actual impact?
  7. Can that impact be demonstrated without unnecessarily damaging or accessing sensitive data?
  8. Is the asset actually in scope? (Scope means the set of targets a bug bounty program allows you to test.)

The investigation followed a deliberate progression, each step increasing confidence and eliminating alternative explanations:

Text
Input reflection
     ↓
Syntax manipulation
     ↓
Boolean behavior
     ↓
Error behavior
     ↓
Database fingerprint
     ↓
Data extraction
  • Input reflection: checking whether what you type comes back in the response.
  • Syntax manipulation: trying to change the structure of the SQL query.
  • Boolean behaviour: seeing if you can make the application behave differently based on a true/false condition.
  • Error behaviour: seeing if you can cause database errors.
  • Database fingerprint: identifying which database software is running.
  • Data extraction: actually pulling out data.

Each step is like climbing a ladder: you don't jump to the top.

3. Exploitation

Step 1: Build a boolean oracle

The most important discovery was a reliable difference between two conditions. Conceptually, the injected query created a conditional expression: when the condition was TRUE the query produced a valid scalar result and the application returned its normal response; when the condition was FALSE the query produced deliberately invalid scalar behaviour, the database raised an error, and the application responded differently.

A scalar result is a single value, like a number or a string, as opposed to a list of rows. A conditional expression is like an if-then-else in SQL: it evaluates a condition and returns one thing if true and another if false.

That gives a binary oracle:

Text
TRUE  → Response A
FALSE → Response B

An oracle is something you can ask questions and get answers from. Here, the application becomes an oracle: you ask a yes/no question through the email parameter, and the response tells you the answer.

The test established the following mapping:

Condition Result
TRUE HTTP 200
FALSE HTTP 302

HTTP status codes are three-digit numbers that a server sends back to tell the browser what happened. 200 means OK, the request succeeded. 302 means Found, a redirect: the server is telling the browser to go to a different URL. The TRUE response contained the normal "not in the system" behaviour, while the FALSE branch produced a redirect caused by the database error. This was the turning point: the parameter was no longer merely suspicious, it was a working SQL execution oracle.

Step 2: Understand what the oracle buys you

Suppose the database holds a value such as:

Text
secret = "8.4.8"

You cannot see it directly, but you can ask whether the first character is 8. With TRUE mapping to HTTP 200 and FALSE to HTTP 302, the application becomes a communication channel. You then ask whether character 1 is A, B, C and so on, then whether character 2 is A, B, C, and eventually reconstruct 8.4.8. This is the essence of blind SQL injection: the application does not return the value, it returns a signal telling you whether your question was true.

Think of it like playing Twenty Questions with someone who only answers yes or no. You can still figure out a lot.

Step 3: Prove the database is the source of the signal

A WAF sat in front of the application. WAF stands for Web Application Firewall: a security tool that inspects incoming requests and tries to block ones that look malicious, often by matching patterns like SQL keywords. That raises an obvious question: could the different responses simply be caused by the WAF? A weak report would say that payload A gives 200 and payload B gives 302, therefore SQL injection. A stronger investigation asks which component is actually generating the difference.

The investigation compared two situations. A UNION SELECT appearing inside a SQL comment passed through the WAF. UNION SELECT is a SQL construct that combines the results of two queries; attackers use it to append their own query to the original one. A SQL comment is text that the database ignores; in SQL, -- starts a comment that runs to the end of the line. Meanwhile, a live SQL expression containing the same general SQL constructs produced the different application response. The response differential tracked whether the SQL expression was actually executed, not simply whether certain keywords appeared in the HTTP request.

The request path to reason about is:

Text
Request
   │
   ▼
 WAF
   │
   ▼
Web application
   │
   ▼
Database

When debugging a suspected injection, determine which layer produced the observable difference. Possible sources include the WAF, a reverse proxy (a server that sits in front of the application and forwards requests), application validation (the app's own checks), a framework exception (an error thrown by the code framework), a database error or an application redirect. Do not confuse them.

Step 4: Fingerprint the database

With a stable oracle, the next objective was to extract a harmless piece of information. A database version is ideal because it proves that SQL is executing, that attacker-controlled expressions are evaluated, that database functions can be invoked and that information can be extracted, without immediately dumping application data.

The investigation tested the first character of the database version and established MySQL 8.x through the injection itself. MySQL is a popular open-source database system; 8.x is a major version series. That is much stronger evidence than identifying MySQL from headers or technology fingerprints: it is database-backed proof. Headers are extra pieces of information sent with HTTP requests and responses; technology fingerprints are clues like file names or error messages that hint at what software is running.

Fingerprinting also tells you which syntax and functions are available. MySQL, PostgreSQL, SQL Server, Oracle and SQLite differ in functions, error behaviour, comments, string functions, metadata structures, syntax and conditional expressions. If your oracle can distinguish SUBSTRING(...) conditions against a database variable, you have moved beyond generic application behaviour into actual database interaction. SUBSTRING is a function that extracts part of a string; for example, SUBSTRING('hello', 1, 1) returns 'h'.

Step 5: The CSRF token was not a security boundary

The endpoint expected a Joomla token, which at first glance might appear to prevent arbitrary requests. A CSRF token is a secret value included in a form to prove the request came from the site's own page and not from an attacker's site. CSRF stands for Cross-Site Request Forgery: an attack where a malicious site tricks your browser into sending a request to another site where you are logged in. Testing showed that the application accepted a token value without actually enforcing the session-bound CSRF relationship expected from a secure implementation. A session is a period of interaction between a user and a site, usually tracked by a cookie (a small piece of data stored in your browser). The presence of a CSRF token parameter does not mean CSRF protection exists. A proper mechanism validates that the token belongs to the expected session, is valid, has not expired and is associated with the intended request. Accepting a correctly formatted token is not meaningful protection.

Step 6: Keep the test non-destructive

This was a password-reset endpoint, so a careless test could trigger a password-reset email for a real user. Instead, testing used random non-matching email addresses so that no actual account matched and no password-reset message was dispatched. When testing a vulnerability, choose inputs that prove it while minimising real-world side effects. For SQL injection that means preferring database version, controlled boolean questions and harmless metadata before massive data dumps, destructive queries or account modifications.

Step 7: From oracle to arbitrary reads

Once the version had been extracted character by character, the capabilities of the oracle were clear. The same mechanism could ask arbitrary questions of reachable data: does this table exist, does this row exist, is this character A, is this value longer than 20 characters, does this user have administrative privileges. The attacker controls the question and the HTTP response provides the answer:

Text
Attacker
   │
   │ "Is condition X true?"
   ▼
Application
   │
   ▼
Database
   │
   │ TRUE / FALSE
   ▼
Application response
   │
   ▼
Attacker

That is why a reliable boolean SQL injection should not be underestimated.

Step 8: Escalate carefully

The next stage was to determine whether application-level data could be reached. The investigation confirmed that a Joomla administrator credential record could be located and extracted through the oracle. A credential record is the stored information that lets someone log in, typically a username and a password hash. A hash is the result of putting a password through a one-way mathematical function; you cannot easily turn it back into the password, but you can check whether a guessed password produces the same hash. For a public writeup the report stops at the fact that a Joomla Super User credential record was successfully extracted from the database, without publishing the actual username or password hash. The extracted password material was a bcrypt hash, and a privileged Joomla account existed. bcrypt is a password-hashing algorithm designed to be slow, which makes guessing harder. That is enough to demonstrate a major escalation path without exposing credential material.

The resulting chain:

Text
Unauthenticated attacker
        │
        ▼
Password reset endpoint
        │
        ▼
SQL injection in email parameter
        │
        ▼
Boolean/error oracle
        │
        ▼
Database fingerprinting
        │
        ▼
Character-by-character extraction
        │
        ▼
Application database access
        │
        ▼
Privileged Joomla credential record
        │
        ▼
Potential administrative compromise

The report separates demonstrated impact from theoretical impact. Demonstrated: unauthenticated SQL execution, a boolean/error oracle, database-backed extraction, MySQL version extraction and Joomla credential record extraction. Potential escalation: recover the credential, authenticate as a privileged user, access the Joomla administrator interface, modify application-controlled content or code, and potentially compromise the server. The second category is an escalation path, not a set of steps that were all performed.

Root cause

The root cause was unsafe construction of the SQL query. Conceptually:

Text
WHERE email = '<attacker-controlled input>'

was built with string concatenation. The secure form is a parameterised query:

Text
WHERE email = ?

with the email supplied separately as a bound parameter. The report identifies parameterisation as the primary remediation.

Escaping the quote is not the ideal fix. Escaping means adding a backslash before a quote so that it is treated as a literal character rather than the end of the string. The architectural fix is a parameterised query with bound parameters, which changes how the database interprets the input: instead of SQL plus user input, the database receives a statement and separate data. The application should never depend on blacklists (lists of bad things to block), regexes (patterns for matching text), keyword filtering, WAF signatures or manual quote escaping as its primary defence against SQL injection.

The WAF was an additional layer and should not be the primary defence. A WAF is an additional layer and should not be the application's primary defence against injection. The security boundary should be the application issuing parameterised queries, not the hope that a WAF catches SQL keywords. The investigation specifically demonstrated that WAF behaviour and database-generated behaviour could be distinguished.

A related factor is that the affected application used Joomla 3.x and ChronoForms V4, and the report identifies ChronoForms V4 as end-of-life. End-of-life (EOL) means the software is no longer maintained or updated, so security fixes are not released. Old CMS versions, old plugins, old components, EOL frameworks and abandoned libraries are not vulnerabilities by themselves, but they raise testing priority. The workflow is technology fingerprint, version identification, known attack surface, interesting endpoints, then manual validation. Version alone is not a vulnerability.

Impact

The core vulnerability was unauthenticated SQL injection with database read capability. The report characterises the immediate impact as unauthenticated boolean/error-based database reads and the possible escalation as administrative compromise. The severity factors were:

  • No authentication. An attacker did not need an account, session, role or invitation.
  • Production application. The affected endpoint belonged to a live application.
  • Database access. The issue was not a local validation problem; the attacker could interact with the backend database.
  • Sensitive application data. The database contained authentication-related records.
  • Privileged account exposure. A Joomla Super User credential record was successfully recovered.

Recovering the credential and using it to authenticate, reach the administrator interface and modify content or code is presented as a potential escalation, not as something that was carried out.

Fix

The report identifies parameterisation as the root fix and recommends additional defence-in-depth controls. Defence in depth means having multiple layers of security, so that if one fails, others still protect you. The vulnerability was eventually remediated, but not because of this report: a different report had already triggered remediation that happened to fix this vulnerability as well. The team explained that the earlier report had been submitted roughly a month before and that its remediation eliminated this issue too.

The outcome is worth recording. The asset was ultimately determined to be outside the formally defined program scope, and the report was initially closed as Not Applicable for that reason. Later the team acknowledged the finding was valid and reopened and triaged it. No bounty was awarded; the report received reputation credit.

Technical validity, program eligibility, bounty eligibility, duplicate status and remediation timing are independent dimensions. A real vulnerability with an excellent proof of concept and confirmed remediation can still pay $0 because of program rules or prior remediation. The practical lesson is to verify scope before investing deeply: is the hostname in scope, is the exact asset in scope, is the endpoint in scope, is third-party infrastructure covered, are there special exclusions. A technically critical vulnerability on an out-of-scope asset may produce no bounty. That is a program-selection failure, not a technical one, and scope verification belongs in reconnaissance. Reconnaissance is the information-gathering phase of an attack or test.

Preserve evidence as soon as an oracle is reliable: the TRUE request and response, the FALSE request and response, database extraction proof, timestamps and the affected endpoint. A vulnerability can disappear during triage, and evidence has to survive the fix. In this case the SQL injection stopped working once unrelated remediation landed.

Variants to test

  1. Other password-reset and account-recovery endpoints. Submit a quote, parentheses and boolean expressions in the email, username or token parameter and compare status, length, body and redirect location against a baseline. A baseline is a recorded normal response to compare against. A positive result is a repeatable TRUE/FALSE difference that survives repeated runs.
  2. Search, sort, filter and order parameters. These are commonly concatenated into queries. A positive result is a stable response differential that tracks the truth of the injected condition rather than the presence of keywords.
  3. Comment-wrapped keywords versus live expressions. Send a UNION SELECT inside a SQL comment and then a live expression with the same constructs. If the comment passes but the live expression changes the response, the difference is coming from execution, not filtering.
  4. Token parameters on forms that expect CSRF protection. Replay a token without the matching session or with a stale value. A positive result is the request being processed anyway, showing the token is accepted but not enforced.
  5. Version extraction as a harmless proof. Ask for the first character of the database version through the oracle. A positive result is a version string reconstructed character by character, which proves evaluation without touching application data.
  6. EOL components and plugins. Fingerprint the CMS, plugins and components, then validate manually. A positive result is a confirmed injection in an endpoint belonging to an end-of-life component, not merely an old version banner.
  7. Scope checks before exploitation. Confirm the hostname, exact asset, endpoint and any third-party infrastructure against the program rules. A positive result is written confirmation that the asset is in scope, which protects the work from being closed as Not Applicable.

Glossary

  • API: Application Programming Interface; a set of rules that lets one piece of software talk to another. In web terms, often a URL that accepts data and returns data.
  • Authentication: The process of proving who you are, usually by logging in.
  • Baseline: A recorded normal response used for comparison when testing.
  • bcrypt: A password-hashing algorithm designed to be slow, making brute-force guessing harder.
  • Blind SQL injection: SQL injection where the application does not return the query results directly; you infer them from behaviour.
  • Boolean: A true/false value.
  • Bound parameter: A placeholder in a SQL query that is filled with data separately, so the data is never treated as SQL code.
  • Bug bounty program: A program that rewards people for finding and reporting security vulnerabilities.
  • ChronoForms: A Joomla component for building and processing forms.
  • CMS: Content Management System; software for building and managing websites, like Joomla or WordPress.
  • Concatenation: Joining pieces of text together end to end.
  • Cookie: A small piece of data stored in your browser by a website, often used to track sessions.
  • Credential record: Stored login information, typically a username and password hash.
  • CSRF: Cross-Site Request Forgery; an attack where another site tricks your browser into making a request to a site where you are logged in.
  • CSRF token: A secret value in a form used to verify the request came from the site's own page.
  • Database: Organised storage for data, queried with a language like SQL.
  • Defence in depth: Multiple layers of security so that if one fails, others still protect.
  • Endpoint: A specific URL that handles a particular function.
  • End-of-life (EOL): Software no longer maintained or updated.
  • Escaping: Adding a special character before a quote so it is treated as literal text, not syntax.
  • Fingerprinting: Identifying software and versions from clues.
  • Hash: The output of a one-way function applied to data, often used for passwords.
  • HTTP: The protocol browsers and servers use to communicate.
  • HTTP status code: A three-digit number indicating the result of a request, like 200 OK or 302 Found.
  • Joomla: A popular open-source content management system.
  • MySQL: A popular open-source database system.
  • Oracle: A commercial database system.
  • Parameter: A named piece of data sent with a request.
  • Parameterised query: A SQL query with placeholders for data, preventing injection.
  • Payload: The special text sent to try to trigger a vulnerability.
  • PostgreSQL: A popular open-source database system.
  • Production application: A live, real-world system used by actual users.
  • Rate limiting: Limiting how many requests can be made in a time period.
  • Reconnaissance: The information-gathering phase of a security test.
  • Redirect: A response telling the browser to go to a different URL.
  • Reverse proxy: A server that sits in front of an application and forwards requests to it.
  • Scope: The set of targets a bug bounty program allows you to test.
  • Session: A period of interaction between a user and a site, often tracked by a cookie.
  • SQL: Structured Query Language; the language used to talk to relational databases.
  • SQL injection: A vulnerability where user input is interpreted as SQL code, letting an attacker change the query.
  • SQLite: A lightweight file-based database system.
  • SQL Server: A database system from Microsoft.
  • String: A sequence of text characters.
  • SUBSTRING: A SQL function that extracts part of a string.
  • Token: A small piece of data, often random, used to verify a request or identify a session.
  • Triage: The process of reviewing and prioritising a reported vulnerability.
  • UNION SELECT: A SQL construct that combines the results of two queries.
  • WAF: Web Application Firewall; a security tool that inspects and blocks suspicious requests.
  • XSS: Cross-Site Scripting; a vulnerability where an attacker injects script into a page viewed by others. (Not used in this report, but often mentioned alongside SQL injection.)

More by redhunter01

View all

24 more disclosed reports, best first.

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.