EasyStore (Joomla) filter_sortby Pre-Authentication SQL Injection (CVE-2026–65761)
The EasyStore e-commerce extension for Joomla inserted the sort direction part of the filter_sortby parameter straight into the ORDER BY clause of a product listing query without checking it. An unauthenticated attacker could inject arbitrary SQL expressions into that slot and confirm execution through a time-based delay.
Published on medium.com
Cve
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.
Context
EasyStore is an e-commerce extension component for Joomla, distributed by the developer JoomShaper. Its product listing page accepts a request parameter called filter_sortby, which lets users choose a sort order. The value is split into a column name and a sort direction (ASC/DESC), and the direction value was inserted directly into the ORDER BY clause of the SQL query with no validation whatsoever.
The issue is tracked as CVE-2026-65761 and classified as CWE-89 (SQL Injection), with a CVSS 4.0 score of 9.3 (Critical). The security firm mySites.guru discovered it and privately disclosed it to JoomShaper on 22 July 2026. The company bundled three vulnerabilities together, SQL Injection, unauthenticated order forgery, and cross-customer invoice disclosure, and silently patched them in version 2.0.2. No separate security advisory was published.
| Item | Value |
|---|---|
| Target | JoomShaper EasyStore (Joomla extension) |
| Affected versions | 1.0.0 to 2.0.1 |
| Patched version | EasyStore 2.0.2 |
| Weakness | CWE-89 (SQL Injection) |
| CVSS 4.0 | 9.3 (Critical) |

Setup
The vulnerability is described as pre-authentication, meaning it is reachable before any login step. The report does not describe any particular tooling beyond the time-based technique used to confirm the injection.
Finding it
The basic rule of SQL Injection defence is: never trust user input, always escape it or use parameter binding (prepared statements). However, an ORDER BY ... ASC / ORDER BY ... DESC style sort direction is one of the few places where this principle cannot be applied directly.
Parameter binding (the ? placeholder) is a mechanism for safely passing a value. But ASC/DESC is not a value, it is a keyword (reserved word) in SQL syntax. Even if you place it in a bound parameter slot, the database will not interpret it as syntax. That is why developers must hard-code a whitelist check directly into the application: accept only ASC or DESC, reject everything else.
EasyStore is exactly where this whitelist validation was missing. Interestingly, the sorting features for the Brand list and Collection list within the same component did have this validation implemented correctly; the check was missing only from the Product list sorting path. In other words, this was not a case of the developers not knowing the risk: it is a classic implementation-omission bug where the same logic was reimplemented in multiple places and one location was simply missed.
Exploitation
The code shown below is a reconstructed example based on the behaviour (file names, line numbers, and processing logic) described in the public vulnerability report. It is not identical to the actual source, but it is sufficient to understand the structure of the vulnerability.
Step 1: the direction value is returned as-is
FilterHelper.php:741 returns the direction value with no validation:
public function getSortDirection($request){ $direction = $request->getString('filter_sortby_direction', 'ASC'); return $direction; }
The defence that should have been in place looked something like this. Reconstructing, as an example, the logic that appears to actually exist in the Brand/Collection list helper:
public function getSortDirection($request){ $direction = strtoupper($request->getString('filter_sortby_direction', 'ASC')); return in_array($direction, ['ASC', 'DESC'], true) ? $direction : 'ASC';
Step 2: the unvalidated value is concatenated into the query
ProductsModel.php:923 takes the unvalidated value and concatenates it directly into the query string:
$sortColumn = $db->quoteName($this->getState('filter.sort_column'));$sortDirection = $this->getSortDirection($request);
$query->order($sortColumn . ' ' . $sortDirection); // direct string concatenation
Why does quoteName() not help here? Joomla's $db->quoteName() and $db->quote() are the standard defence tools for safely escaping identifiers (column/table names) and values, respectively. But the $sortDirection in this vulnerability is neither an identifier nor a value: it is part of SQL syntax (a keyword). quoteName('column') only wraps a column name in backticks, and wrapping the direction value with quote('value') would turn it into ORDER BY col 'DESC', which is a syntax error. So the direction value can only be defended with a whitelist, not escaping, and it is precisely that whitelist that was missing.
Step 3: the assembled query
The actual exploit payload is not disclosed, but combining the two code paths above produces a final executed query with roughly this shape:
SELECT * FROM #__easystore_productsORDER BY price {ATTACKER-CONTROLLED SQL EXPRESSION}
In the one slot where only the two words ASC or DESC should ever be allowed, an attacker-controlled arbitrary SQL expression can be inserted directly. To demonstrate the issue without extracting real data, mySites.guru said it confirmed successful injection using a time-based technique, deliberately delaying the database response under specific conditions. A response delayed by several seconds compared to a normal request serves as evidence that the injected statement executed.
Step 4: the attack flow

- A request reaches the product listing endpoint with a crafted
filter_sortbyparameter. - The direction segment is extracted without validation.
- The value is concatenated directly into the
ORDER BYclause. - The database executes attacker-controlled SQL as part of the sort expression.
- Success or failure is inferred via a time-based side channel (response delay), without needing to read result data directly.
Root cause
The mistake is a missing whitelist on the sort direction. The filter_sortby value is split into a column name and a direction, and the direction is placed into the ORDER BY clause by direct string concatenation. Because ASC/DESC is SQL syntax rather than a value, neither parameter binding nor quote()/quoteName() can make the slot safe; only an explicit check that the value is exactly ASC or DESC can. That check existed in the Brand list and Collection list sorting paths but was omitted from the Product list path, so the same logic reimplemented in several places left one location unprotected.
Impact
The vulnerability is described as pre-authentication, and the report says injection was confirmed with a time-based technique. The report does not state what data could be read or what privileges the database account holds; it notes only that the injection was confirmed with a time-based technique rather than by extracting data. The same patch also covered unauthenticated order forgery and cross-customer invoice disclosure, which were bundled with the SQL Injection and disclosed privately to JoomShaper.
Fix
The vendor silently patched the issue in EasyStore 2.0.2, which bundles fixes for the SQL Injection, the unauthenticated order forgery and the cross-customer invoice disclosure. No separate security advisory was published, so the report recommends the following:
- Update immediately: if you run EasyStore, upgrade to 2.0.2 or later. Because it was patched silently with no separate security notice, it is easy to overlook by only skimming the changelog.
- Review WAF rules: confirm that SQL-keyword-based filtering rules (UNION, SLEEP, information_schema, etc.) are also applied to
filter_sortby-style parameters. - Least-privilege DB accounts: verify the DB account used by the web application does not have unnecessary permissions to query
information_schemaor superuser-level access. - Review logs: check recent access logs for requests where the
filter_sortbyparameter contained anything other than ASC/DESC: quotes, parentheses, or SQL keywords.
Variants to test
- Other sort parameters in the same component. The Brand list and Collection list helpers validate the direction, but other list views may not. A positive result is a request whose direction segment accepts a value other than ASC/DESC and produces a measurable response delay.
- Time-based confirmation on any
ORDER BYslot. Where a sort direction is concatenated, try a conditional delay expression in the direction position. A response delayed by several seconds compared to a normal request is the signal. - Keyword filtering on WAF-protected targets. Check whether SQL keywords such as UNION, SLEEP and information_schema are filtered on
filter_sortby-style parameters; if they are not, the same class of injection may pass through. - Database account privileges. On a confirmed injection, check whether the application's database account can query
information_schemaor has superuser-level access, which would widen the impact beyond the sort expression itself. - Access log review. Search recent logs for
filter_sortbyvalues containing quotes, parentheses or SQL keywords; such entries indicate attempted exploitation of the same slot.
What happened, in plain words
A popular add-on for the Joomla website builder had a hole in one of its pages. The add-on is called EasyStore, and it turns a Joomla site into an online shop. One of its pages, the page that lists products, lets a visitor choose how the products are sorted. The shop took part of that choice and pasted it straight into the instruction it sends to its database, without checking what the visitor had typed. A security firm found this, told the developer privately, and the developer fixed it quietly in a new version. Nobody published a separate security notice, which is why the fix is easy to miss.
The hole is tracked as CVE-2026-65761. A CVE is a public catalogue number for a known security flaw, so people can talk about the same bug without confusion. The flaw is classified as CWE-89, which is the catalogue's name for SQL Injection, and it was given a CVSS 4.0 score of 9.3, labelled Critical. CVSS is a scoring system that tries to put a number on how serious a flaw is; 9.3 out of 10 is near the top. The security firm mySites.guru discovered the issue and told JoomShaper, the developer, privately on 22 July 2026. JoomShaper fixed three problems at once, the SQL Injection, a way to place orders without being logged in (unauthenticated order forgery), and a way to see other customers' invoices (cross-customer invoice disclosure), and shipped the fixes in version 2.0.2.

Here is the summary of the affected software in a table:
| Item | Value |
|---|---|
| Target | JoomShaper EasyStore (Joomla extension) |
| Affected versions | 1.0.0 to 2.0.1 |
| Patched version | EasyStore 2.0.2 |
| Weakness | CWE-89 (SQL Injection) |
| CVSS 4.0 | 9.3 (Critical) |
A few words in that table need unpacking. Joomla is a free system for building websites, a bit like a kit of parts: you install it, then add extra parts called extensions to get features you want. EasyStore is one of those extensions, made by a company called JoomShaper, and it adds a shop: products, brands, collections, orders, invoices. A version number like 2.0.2 is just a label the developer gives each release, so you can tell one release from another. "Affected versions 1.0.0 to 2.0.1" means every release from the first one up to and including 2.0.1 has the flaw, and 2.0.2 is the first one that does not.
Setup
The vulnerability is described as pre-authentication, meaning the attack happens before any login step. Security people call this "pre-authentication": the attack happens before any login step. No session, no role, no password is needed. The report does not describe any particular tooling beyond the time-based technique used to confirm the injection, which we will come to.
Finding it
The general rule for defending against SQL Injection is: never trust what a user sends, always escape it or use parameter binding (prepared statements). To follow that, you need to know what a database and a query are.
A database is an organised store of information, like a very large set of spreadsheets that the shop keeps on a server. A query is the instruction the website sends to the database, written in a language called SQL. A simple query might say "give me all products, sorted by price, from cheapest to dearest". The website builds that sentence as text and sends it off.
SQL Injection means a user manages to slip extra SQL words into that sentence, so the database does something the website author never intended. The everyday comparison: imagine a form that asks for your name and then prints "Hello, [your name]". If you write a name that contains a full extra instruction, the printer may follow it. The database has the same weakness if the website glues user text into the query without care.
Parameter binding, also called a prepared statement, is the usual defence. The website writes the query with a placeholder, a ?, and hands the user's value over separately. The database treats that value purely as data, never as part of the instruction. It is like posting a filled-in form into a slot rather than reading the form aloud into a microphone: the words on the form cannot become commands.
But there is a catch. An ORDER BY ... ASC or ORDER BY ... DESC sort direction is one of the few places where this defence cannot be applied directly. ORDER BY is the part of a query that says how to sort the results. ASC means ascending (A to Z, cheapest first) and DESC means descending (Z to A, dearest first).
Why can it not be bound? Parameter binding is a mechanism for safely passing a value, such as a price or a name. But ASC and DESC are not values: they are keywords, also called reserved words, in SQL syntax. A keyword is a word the database language itself uses as grammar, like "sort" in a sentence. If you put a keyword into a bound parameter slot, the database will not interpret it as grammar; it will treat it as a piece of text. That is why developers must hard-code a whitelist check directly into the application: accept only ASC or DESC, reject everything else. A whitelist is a list of allowed things; anything not on the list is refused. It is the opposite of a blacklist, which lists forbidden things and lets everything else through.
EasyStore is exactly where this whitelist validation was missing. Interestingly, the sorting features for the Brand list and Collection list within the same component did have this validation implemented correctly. The check was missing only from the Product list sorting path. In other words, this was not a case of the developers not knowing the risk: it is a classic implementation-omission bug, where the same logic was reimplemented in several places and one location was simply missed. Think of a building with several doors that should all be locked at night; the guard locks most of them but forgets one, not because he does not know how locks work, but because he was working through a list and skipped a line.
Exploitation
The code shown below is a reconstructed example based on the behaviour (file names, line numbers, and processing logic) described in the public vulnerability report. It is not identical to the actual source, but it is sufficient to understand the structure of the vulnerability. In other words, the author of the write-up did not have the exact original files in front of them; they rebuilt a plausible version from what the report described, to make the shape of the bug clear.
Step 1: the direction value is returned as-is
FilterHelper.php:741 returns the direction value with no validation:
public function getSortDirection($request){ $direction = $request->getString('filter_sortby_direction', 'ASC'); return $direction; }
Line by line, in plain words:
public function getSortDirection($request)declares a small named routine, a function, calledgetSortDirection. A function is a reusable block of code with a name, like a recipe you can call by name. The$requestin the brackets is the incoming request from the visitor, the bundle of everything their browser sent.$direction = $request->getString('filter_sortby_direction', 'ASC');asks the request for a piece of text calledfilter_sortby_direction. If the visitor did not supply one, it uses'ASC'as the default. The result is stored in a variable,$direction, which is just a labelled box holding a value.return $direction; }hands that value straight back to whoever called the function, with no check in between. This is the heart of the problem: whatever text arrived is passed on unchanged.
The defence that should have been in place looked something like this. Reconstructing, as an example, the logic that appears to actually exist in the Brand/Collection list helper:
public function getSortDirection($request){ $direction = strtoupper($request->getString('filter_sortby_direction', 'ASC')); return in_array($direction, ['ASC', 'DESC'], true) ? $direction : 'ASC';
Again line by line:
public function getSortDirection($request)is the same starting point: a function that takes the visitor's request.$direction = strtoupper($request->getString('filter_sortby_direction', 'ASC'));reads the same piece of text, then runs it throughstrtoupper, which converts letters to capitals. SoascbecomesASC. This is a small convenience so that lower-case input is not rejected just for its case.return in_array($direction, ['ASC', 'DESC'], true) ? $direction : 'ASC';is the whitelist.in_arrayasks: is this value one of the items in the list['ASC', 'DESC']? Thetruemakes the comparison strict, meaning it must match exactly. The? ... : ...part is a compact if-then-else: if the answer is yes, return the value; otherwise return'ASC'as a safe fallback. Anything that is not exactly ASC or DESC is thrown away and replaced.
That is the whole difference between the safe version and the broken one: one extra check that the value is on a short list.
Step 2: the unvalidated value is concatenated into the query
ProductsModel.php:923 takes the unvalidated value and concatenates it directly into the query string:
$sortColumn = $db->quoteName($this->getState('filter.sort_column'));$sortDirection = $this->getSortDirection($request);
Line by line:
$sortColumn = $db->quoteName($this->getState('filter.sort_column'));works out which column to sort by, for example the price column.$dbis the database connection object, the thing that talks to the database.quoteNamewraps a column or table name in the database's quoting characters, which is the safe way to handle names.$this->getState('filter.sort_column')fetches the chosen column from the page's stored state.$sortDirection = $this->getSortDirection($request);calls the function from Step 1 and stores whatever it returns. Because that function does no checking, this variable can now hold anything the visitor sent.
Then the value is used:
$query->order($sortColumn . ' ' . $sortDirection); // direct string concatenation
Line by line:
$query->order(...)tells the query object to add anORDER BYclause, the sorting instruction.$sortColumn . ' ' . $sortDirectionglues three pieces of text together with the dot operator: the column name, a single space, and the direction. This is direct string concatenation, meaning the pieces are simply stuck end to end like beads on a string, with no separation between code and data.- The comment
// direct string concatenationis the author pointing at the exact line where the danger sits.
Why does quoteName() not help here? Joomla's $db->quoteName() and $db->quote() are the standard defence tools for safely escaping identifiers (column and table names) and values, respectively. An identifier is a name, like the name of a column; a value is a piece of content, like a price. But the $sortDirection in this vulnerability is neither an identifier nor a value: it is part of SQL syntax, a keyword. quoteName('column') only wraps a column name in backticks, and wrapping the direction value with quote('value') would turn it into ORDER BY col 'DESC', which is a syntax error. So the direction value can only be defended with a whitelist, not escaping, and it is precisely that whitelist that was missing.
A comparison: a bouncer at a door can check a guest's name against a list (a value) or check that a staff badge is genuine (an identifier). But if the guest is supposed to be the word "OPEN" on a sign, there is no name to check; you can only decide whether the sign says exactly OPEN or something else.
Step 3: the assembled query
The actual exploit payload is not disclosed, but combining the two code paths above produces a final executed query with roughly this shape:
SELECT * FROM #__easystore_productsORDER BY price {ATTACKER-CONTROLLED SQL EXPRESSION}
Line by line:
SELECT * FROM #__easystore_productsasks the database for every column (*) of every row in the products table. The#__prefix is a Joomla convention that gets replaced with the site's own table prefix, so several sites can share one database without their tables colliding.ORDER BY pricesays to sort the results by the price column.{ATTACKER-CONTROLLED SQL EXPRESSION}is a placeholder for whatever the attacker managed to put in the direction slot. In a normal request this would be the single wordASCorDESC. In a malicious one it can be a whole extra SQL expression.
In the one slot where only the two words ASC or DESC should ever be allowed, an attacker-controlled arbitrary SQL expression can be inserted directly. To demonstrate the issue without extracting real data, mySites.guru said it confirmed successful injection using a time-based technique, deliberately delaying the database response under specific conditions. A response delayed by several seconds compared to a normal request serves as evidence that the injected statement executed.
Why use a delay instead of just reading data out? Because a delay is harmless and unambiguous. If you ask the database to pause for a few seconds only when a certain condition is true, and the page then takes those extra seconds to answer, you have proof that your injected words ran. It is like knocking on a wall and listening for a hollow echo: you learn something about the inside without opening it. The report does not say what data could have been read or what privileges the database account holds; it notes only that the injection was confirmed this way rather than by extracting data.
Step 4: the attack flow

- A request reaches the product listing endpoint with a crafted
filter_sortbyparameter. An endpoint is simply a web address the site responds to; a parameter is a named extra piece of information attached to the address, the part after a?in a URL. The visitor's browser sends this request, just as it would when clicking a sort button on the shop page. - The direction segment is extracted without validation. The code takes the part of the value that says which way to sort and does not check it against the list of allowed words.
- The value is concatenated directly into the
ORDER BYclause. The unchecked text is glued into the database instruction. - The database executes attacker-controlled SQL as part of the sort expression. The database cannot tell the difference between the shop's own words and the attacker's, because they arrived as one continuous sentence.
- Success or failure is inferred via a time-based side channel (response delay), without needing to read result data directly. A side channel is any indirect signal, here the time the page takes to answer, that reveals something about what happened inside.
Root cause
The mistake is a missing whitelist on the sort direction. The filter_sortby value is split into a column name and a direction, and the direction is placed into the ORDER BY clause by direct string concatenation. Because ASC/DESC is SQL syntax rather than a value, neither parameter binding nor quote() or quoteName() can make the slot safe; only an explicit check that the value is exactly ASC or DESC can. That check existed in the Brand list and Collection list sorting paths but was omitted from the Product list path, so the same logic reimplemented in several places left one location unprotected.
Impact
The vulnerability is described as pre-authentication, and the report says injection was confirmed with a time-based technique. "Unauthenticated" means without logging in at all. The same patch also covered unauthenticated order forgery and cross-customer invoice disclosure, which were bundled with the SQL Injection and disclosed privately to JoomShaper. Order forgery here means placing orders without being logged in; cross-customer invoice disclosure means one customer being able to see another customer's invoice.
Fix
The vendor silently patched the issue in EasyStore 2.0.2, which bundles fixes for the SQL Injection, the unauthenticated order forgery and the cross-customer invoice disclosure. No separate security advisory was published, so the report recommends the following:
- Update immediately: if you run EasyStore, upgrade to 2.0.2 or later. Because it was patched silently with no separate security notice, it is easy to overlook by only skimming the changelog. A changelog is the list of changes a developer publishes with each release.
- Review WAF rules: confirm that SQL-keyword-based filtering rules (UNION, SLEEP, information_schema, etc.) are also applied to
filter_sortby-style parameters. A WAF, or web application firewall, is a filter that sits in front of a website and blocks requests that look malicious. UNION, SLEEP and information_schema are SQL words commonly used in attacks; information_schema is the database's own catalogue of its tables and columns. - Least-privilege DB accounts: verify the DB account used by the web application does not have unnecessary permissions to query
information_schemaor superuser-level access. Least privilege means giving an account only the permissions it actually needs, the way a hotel cleaner gets a key to the rooms but not to the safe. - Review logs: check recent access logs for requests where the
filter_sortbyparameter contained anything other than ASC/DESC: quotes, parentheses, or SQL keywords. An access log is the record a web server keeps of every request it received.
Variants to test
- Other sort parameters in the same component. The Brand list and Collection list helpers validate the direction, but other list views may not. A positive result is a request whose direction segment accepts a value other than ASC/DESC and produces a measurable response delay.
- Time-based confirmation on any
ORDER BYslot. Where a sort direction is concatenated, try a conditional delay expression in the direction position. A response delayed by several seconds compared to a normal request is the signal. - Keyword filtering on WAF-protected targets. Check whether SQL keywords such as UNION, SLEEP and information_schema are filtered on
filter_sortby-style parameters; if they are not, the same class of injection may pass through. - Database account privileges. On a confirmed injection, check whether the application's database account can query
information_schemaor has superuser-level access, which would widen the impact beyond the sort expression itself. - Access log review. Search recent logs for
filter_sortbyvalues containing quotes, parentheses or SQL keywords; such entries indicate attempted exploitation of the same slot.
Glossary
- Access log: a file a web server keeps listing every request it received, with details such as the address and the parameters.
- ASC / DESC: SQL keywords meaning ascending (A to Z, lowest first) and descending (Z to A, highest first).
- Authentication: the step where a website checks who you are, usually by asking for a username and password.
- Brand list / Collection list: other product groupings inside EasyStore that have their own sorting features.
- Changelog: the list of changes a developer publishes with each release.
- Component / extension: an add-on that gives a website extra features, installed on top of a base system such as Joomla.
- Concatenation: joining pieces of text end to end into one string.
- CVE: a public catalogue number for a known security flaw, so people can refer to the same bug unambiguously.
- CVSS: a scoring system that puts a number on how serious a security flaw is; 9.3 out of 10 is labelled Critical.
- CWE-89: the catalogue's name for SQL Injection.
- Database: an organised store of information kept on a server, which a website queries for its content.
- Endpoint: a web address that a site responds to.
- Escaping: marking text so that it is treated purely as data and not as part of an instruction.
- Function: a named, reusable block of code that can be called by name.
- Identifier: a name in a database, such as a column or table name.
- information_schema: the database's own catalogue of its tables and columns.
- Joomla: a free system for building websites, extended with add-ons.
- Keyword (reserved word): a word the database language uses as grammar, such as ASC or DESC, rather than as a value.
- Least privilege: giving an account only the permissions it actually needs.
- ORDER BY: the part of a SQL query that says how to sort the results.
- Parameter: a named extra piece of information attached to a web address, the part after a
?. - Parameter binding (prepared statement): a way of sending user values to a database separately from the query text, so they can never become part of the instruction.
- Payload: the crafted input an attacker sends to try to trigger a flaw.
- Pre-authentication: reachable before any login step, so no account is needed.
- Query: an instruction sent to a database, written in SQL.
- quote() / quoteName(): Joomla database helpers that safely wrap values and identifiers respectively.
- Response delay: extra time a page takes to answer, used here as evidence that injected SQL ran.
- Side channel: an indirect signal, such as timing, that reveals something about what happened inside a system.
- SQL: the language used to send instructions to a database.
- SQL Injection: slipping extra SQL words into a query so the database does something the website author never intended.
- Time-based technique: confirming an injection by making the database pause under a chosen condition and measuring the delay.
- Unauthenticated: without logging in at all.
- UNION / SLEEP: SQL words commonly used in attacks; SLEEP makes the database pause.
- Variable: a labelled box in code that holds a value.
- WAF (web application firewall): a filter in front of a website that blocks requests that look malicious.
- Whitelist: a list of allowed things; anything not on the list is refused.