HIGH 7.7

CVE-2026-37149: SQL Injection in Grocery Store Management System PHP Application

A SQL injection vulnerability has been discovered in GROCERY-STORE-MANAGEMENT-SYSTEM-USING-PHP-AND-MYSQL-PHPMYADMIN v1.0, specifically in the product search functionality. An attacker can craft malicious input in the scost parameter to execute arbitrary SQL commands against the underlying MySQL database, potentially exposing customer data, inventory records, pricing information, and other sensitive business information. The vulnerability requires local access to the affected system and does not require authentication.

Source data · NVD / CISA · public domain

CVSS
3.1 · 7.7 HIGH · CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Weaknesses (CWE)
CWE-89
Affected products
0 configuration(s)
Published / Modified
2026-06-25 / 2026-06-26

NVD description (verbatim)

GROCERY-STORE-MANAGEMENT-SYSTEM-USING-PHP-AND-MYSQL-PHPMYADMIN v1.0 was discovered to contain a SQL injection vulnerability in the scost parameter in /grocery/search_products.php. This vulnerability allows attackers to access sensitive database information via a crafted SQL statement.

3 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability resides in /grocery/search_products.php where user-supplied input from the scost parameter is passed directly into SQL queries without proper sanitization or parameterized query preparation. This classic SQL injection flaw (CWE-89) allows an attacker with local system access to inject arbitrary SQL code. The CVSS 3.1 score of 7.7 (HIGH) reflects the high impact on confidentiality and integrity, though availability is not affected. The attack vector is local with low complexity and no required user interaction, meaning an attacker already present on the system can exploit this with minimal effort.

Business impact

For grocery store operations relying on this management system, a successful SQL injection attack could lead to unauthorized access to customer personal information, transaction histories, pricing data, and inventory management records. This creates exposure to customer privacy breaches, potential regulatory compliance violations (PCI DSS for payment data, GDPR for personal information), reputational damage, and operational disruption if the attacker modifies or deletes critical business data. Small to medium-sized grocers using this open-source system are particularly vulnerable as they may lack sophisticated endpoint security controls.

Affected systems

GROCERY-STORE-MANAGEMENT-SYSTEM-USING-PHP-AND-MYSQL-PHPMYADMIN version 1.0 is confirmed affected. Any deployment of this system that has not implemented input validation filters or Web Application Firewall (WAF) rules around the search_products.php endpoint is at risk. Systems where phpMyAdmin is also deployed with weak access controls face compounded risk.

Exploitability

While the vulnerability requires local access to the system (not remote network exploitation), it is straightforward to exploit once an attacker is positioned locally. No special tools beyond basic SQL knowledge and ability to craft HTTP requests are needed. The lack of authentication requirements on the search function increases risk if the web application is exposed through misconfigured access controls or if a lower-privileged user gains local system access.

Remediation

Immediate actions: (1) Apply input validation and sanitization to the scost parameter and all user-supplied input in search_products.php; (2) Refactor database queries to use prepared statements or parameterized queries; (3) Implement principle of least privilege for database credentials used by the PHP application; (4) Enable SQL error suppression to prevent information leakage. Verify patches or mitigations directly against the upstream project repository or vendor advisory, as version numbering for this codebase should be confirmed.

Patch guidance

Check the official project repository for any released patches addressing this SQL injection in search_products.php. If the project has released version 1.1 or later, apply that update and test thoroughly in a staging environment first. Verify the patch actually replaces vulnerable query construction with parameterized prepared statements. Until patched, apply a temporary WAF rule to block SQL keywords in the scost parameter as a compensating control.

Detection guidance

Monitor web server access logs for unusual patterns in /grocery/search_products.php requests, particularly those containing SQL metacharacters (single quotes, semicolons, UNION, SELECT, etc.) in the scost parameter. Enable PHP error logging to capture any SQL errors that might indicate injection attempts. Database query logging (MySQL general log or slow query log) can reveal suspicious SQL being executed. Implement SIEM rules to correlate multiple failed or unusual search queries from the same source IP.

Why prioritize this

This vulnerability warrants high priority due to its direct impact on confidential customer and business data. While it requires local system access (lowering immediate remote exploitation risk), any grocery business managing customer information, payment card data, or inventory must treat this seriously. The ease of exploitation once an attacker is local, combined with the likelihood of local administrative or employee access to systems in a small business environment, makes this a realistic threat. The absence of KEV designation does not diminish the real-world risk to affected deployments.

Risk score, explained

The CVSS 3.1 score of 7.7 (HIGH) appropriately reflects high impact to data confidentiality and integrity through SQL injection, mitigated somewhat by the requirement for local attack vector. The score penalizes the vulnerability for not affecting system availability, but the potential for full database compromise through data exfiltration or modification justifies the HIGH severity rating for any organization storing sensitive customer or financial data.

Frequently asked questions

Does this vulnerability allow remote attackers to break in?

No. The CVSS attack vector is local, meaning an attacker must already have local system access. However, in many small business environments, system access may be shared among multiple users or contractors, increasing the risk that someone with local access could exploit this.

What versions of PHP and MySQL are affected?

The vulnerability is specific to GROCERY-STORE-MANAGEMENT-SYSTEM-USING-PHP-AND-MYSQL-PHPMYADMIN v1.0. It affects any deployment of this application regardless of the underlying PHP and MySQL versions, provided those versions support the PHP code as written.

Can a WAF or IDS detect exploitation attempts?

Yes. A Web Application Firewall configured to block SQL injection patterns (UNION, SELECT, comments, etc.) in GET/POST parameters can prevent most attack payloads. Database activity monitoring and SQL query logging can detect successful or attempted exploitation at the database level.

If we're not using the search feature, are we still at risk?

If the application is installed but the search functionality is not actively used, the risk is lower but not eliminated. An attacker with local access could still invoke the vulnerable endpoint directly. The safest approach is to apply input validation or patching rather than relying on functional avoidance.

This analysis is provided for informational purposes to support vulnerability management and security decision-making. SEC.co does not verify the exploitability claims or accuracy of vendor patch information. Administrators must test any patches in a controlled staging environment before production deployment. Consult the upstream project repository and security advisories for the most current patch status and remediation guidance. This vulnerability analysis does not constitute legal or compliance advice; organizations should consult their legal and compliance teams regarding data breach notification obligations and regulatory requirements applicable to their jurisdiction and industry. Source: NVD (public-domain), retrieved 2026-08-04. Analysis generated by SEC.co (claude-haiku-4-5).