/

CVE-2019-25260

Severity:

HIGH RISK

(8.2)

SQL Injection in OXID eShop

CVE-2019-25260

Awaiting Analysis

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Arbitrary Code Execution via SQL Injection

Severity:

HIGH RISK

(8.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

OXID eShop 6.x prior to 6.3.4 contains a SQL injection vulnerability in the sorting parameter that can be abused to manipulate database content and inject PHP code.

When attackers can control this parameter in HTTP requests, they may persist malicious payloads in the database and ultimately execute arbitrary code via crafted URLs.

Affected context

This vulnerability arises in OXID eShop installations where user-controlled request parameters, specifically the sorting parameter, are used to build SQL queries for listing or ordering data.

It is relevant in contexts where:

  • The sorting parameter is accepted from GET or POST requests without strict allowlisting
  • Query fragments or ORDER BY clauses are built using string concatenation
  • Application logic later interprets database content in a way that can trigger PHP execution (e.g., dynamic templates, eval-like behavior, or unsafe include mechanisms)

Exploit preconditions

  • Attack surface: HTTP interface of the OXID eShop application (web storefront, sorting-related endpoints).
  • Required access: Ability to send crafted requests to the application endpoints that accept the sorting parameter (usually unauthenticated or low-privileged web access).
  • Trigger point: Application constructs SQL queries using the sorting parameter without robust validation or parameterization, allowing malicious SQL fragments to be injected.
  • Why exploitation is possible: The code path uses string concatenation or interpolation with untrusted input to form SQL statements, enabling attackers to modify query structure, write crafted content into the database, and later have that content interpreted as PHP through other dynamic application behavior.

Why this happens

The underlying issue maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

Instead of using parameterized queries or strict allowlists for sortable fields, the application incorporates the user-supplied sorting value directly into SQL statements.

This insecure pattern treats external input as part of the SQL syntax (e.g., column names, direction clauses, or even injected expressions), allowing attackers to alter queries, store unexpected data, and influence subsequent application behavior that reads and executes that data as code.

Potential impact

  • Modification or insertion of arbitrary data into the OXID eShop database
  • Injection of PHP code or malicious payloads into database-backed fields
  • Execution of arbitrary PHP code via crafted URLs or application flows that read and interpret injected data
  • Compromise of the web application, including potential takeover of the underlying hosting environment depending on configuration
  • Exposure or tampering of customer data, orders, or configuration records

General mitigation guidance

Effective mitigation focuses on eliminating direct use of user input in SQL syntax and preventing any execution of code sourced from data:

  • Use parameterized queries / prepared statements for all SQL operations, avoiding string concatenation for both values and structural elements wherever possible.
  • Apply strict allowlisting for sortable fields: map a small set of known column identifiers (e.g., name, price, created_at) to fixed SQL fragments instead of passing user input directly into ORDER BY or similar clauses.
  • Normalize and constrain input for direction flags (e.g., translate only asc/desc to predefined constants).
  • Avoid patterns where database content can be interpreted as PHP or executable logic; store only data and treat it as such in templates and business logic.
  • Apply least-privilege to the database user so that even if a query is manipulated, the account cannot perform dangerous operations beyond what is strictly necessary.

How teams detect issues like this

Organizations can detect similar vulnerabilities using multiple complementary approaches:

  • Static analysis: Configure rules to flag dynamic SQL construction, especially where request parameters like sorting are concatenated into query strings or ORDER BY clauses.
  • Code review: Examine controller and model code that handles list views and sorting; look for string-built queries and absence of allowlists or prepared statements.
  • Runtime and log analysis: Monitor database logs for suspicious patterns (e.g., unexpected ORDER BY expressions, stacked queries, or anomalous function calls within SQL).
  • Security testing: Use automated DAST tools or manual penetration tests to probe parameters used for sorting, filtering, and pagination for SQL injection behavior.
  • Policy enforcement: Introduce internal coding standards that prohibit raw SQL concatenation and require parameterization and field allowlisting for all dynamic query components.

Sources

SourceLink
bugs.oxid-esales.combugs.oxid-esales.com/view.php?id=7002
github.comgithub.com/OXID-eSales/oxideshop_ce
web.archive.orgweb.archive.org/web/20190731211638/https://blog.ripstech.com/2019/oxid-esales-shop-software/
web.archive.orgweb.archive.org/web/20201020223434/https://www.vulnspy.com/en-oxid-eshop-6.x-sqli-to-rce/
exploit-db.comexploit-db.com/exploits/48527
oxid-esales.comoxid-esales.com/
vulncheck.comvulncheck.com/advisories/oxid-eshop-sorting-sql-injection

Frequently asked

questions

Yes. An attacker can exploit it remotely by sending crafted HTTP requests that manipulate the sorting parameter, as long as the affected endpoints are exposed over the network.

Not necessarily. If the vulnerable endpoint is accessible without logging in (e.g., public product listing pages), an unauthenticated attacker can attempt exploitation. If the parameter is only available after login, low-privileged access would be sufficient.

The safest pattern is to replace any string-built SQL with parameterized queries and to strictly allowlist any user-controllable elements that influence query structure, such as sortable fields or sort directions. Input should never be directly embedded into SQL syntax.

Adopt a secure data access layer that enforces parameterization by default, define and enforce coding standards for safe query construction, and integrate static analysis and security testing into CI pipelines so that any new dynamic SQL code paths are flagged and reviewed early.

Find out what's already
exploitable in your codebase.