/

CVE-2026-32888

Severity:

HIGH RISK

(8.8)

SQL Injection in Open Source Point of Sale Item Search

CVE-2026-32888

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Arbitrary SQL Query Execution and Data Compromise

Severity:

HIGH RISK

(8.8)

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

Open Source Point of Sale contains an SQL Injection vulnerability in the Items search functionality when the custom attribute search feature is enabled.

Because user-supplied search parameters are interpolated directly into a HAVING clause without parameterization, an authenticated user with item search access may execute arbitrary SQL against the backend database.

Affected context

The vulnerability appears in the web-based item search endpoint of Open Source Point of Sale when the search_custom filter is enabled.

In this configuration, user-controlled data from a search GET parameter is incorporated into a dynamically constructed SQL query, specifically into a HAVING clause for custom attributes.

The issue is most relevant in deployments where:

  • Users have authenticated access and permission to search items
  • The application connects to a shared or production database
  • Database accounts have broader read/write privileges beyond a minimal item catalog

Exploit preconditions

  • Attack surface: HTTP(S) item search endpoint in the web UI or API.
  • Required access: Authenticated user with basic permission to perform item searches.
  • Configuration requirement: Custom attribute search feature enabled (e.g., search_custom filter active).
  • Trigger point: Submission of crafted input via the search GET parameter that is interpolated into the SQL HAVING clause.
  • Why exploitation is possible: The application builds SQL fragments by string-concatenating untrusted input directly into the query, without parameter binding or sufficient input validation, enabling manipulation of the query structure.

Why this happens

This issue stems from building SQL queries through string concatenation using untrusted input, then executing the resulting statement directly against the database.

Instead of binding user parameters via prepared statements or a query builder, the code interpolates the search GET parameter into a HAVING clause when custom attribute search is enabled.

This pattern maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where attacker-controlled characters can escape intended query boundaries and alter logic, join additional tables, or access unrelated data.

Potential impact

  • Exposure of sensitive data from other tables that the database user can access (e.g., customers, transactions, user accounts).
  • Unauthorized modification or deletion of records, including inventory items and sales data.
  • Creation of new records or alteration of financial and inventory information, impacting integrity and reporting.
  • Potential retrieval of password hashes or session-related data, which could support further compromise.
  • In some database configurations, execution of database-specific commands that may impact availability or facilitate lateral movement.

General mitigation guidance

Mitigation generally focuses on eliminating direct string interpolation in SQL construction and narrowing the trust boundary around user inputs:

  • Use parameterized queries or a framework-provided query builder for all dynamic conditions, including HAVING clauses and custom attribute filters.
  • Restrict which fields and operators can be influenced by user input; treat user data only as values, never as query structure.
  • Apply strict server-side validation and canonicalization to search parameters, enforcing expected formats (e.g., length limits, allowed character sets, and known attribute names).
  • Introduce a whitelist-based mapping from user-selectable attributes to predefined SQL fragments, instead of passing attribute names or expressions directly.
  • Configure database accounts with least-privilege access so that even if a query is manipulated, accessible data and operations are limited.

How teams detect issues like this

High-level detection typically combines code-focused review with runtime monitoring:

  • Use static analysis tools or linters to flag direct concatenation of request parameters into SQL strings, especially around search and filter features.
  • During code review, look for dynamic WHERE or HAVING clause construction that incorporates raw GET/POST variables, focusing on search and reporting modules.
  • Enforce secure coding guidelines via pull-request templates or automated checks that require parameterized queries for all database access.
  • Deploy web application firewalls (WAFs) or database activity monitoring solutions that can detect common SQL injection patterns in incoming traffic or query logs.

Sources

SourceLink
github.comgithub.com/opensourcepos/opensourcepos/security/advisories/GHSA-hmjv-wm3j-pfhw

Frequently asked

questions

Yes, but only through authenticated access. An attacker must be able to log in and perform item searches over HTTP(S) to reach the vulnerable search endpoint.

The attacker needs valid credentials with sufficient permissions to use the Items search feature when the custom attribute search option is enabled. No special administrative privileges are required beyond search capability.

Replace all string-concatenated SQL in the item search logic with parameterized queries or a safe query builder, ensuring the user-supplied search term is treated strictly as a bound value. Additionally, constrain selectable attributes to a predefined whitelist and validate inputs against expected formats.

Adopt a standard database access layer that enforces parameterization by default, document a team-wide guideline prohibiting raw SQL concatenation with user input, and integrate static analysis or security checks into CI/CD to detect unsafe query construction patterns before deployment.

Find out what's already
exploitable in your codebase.