CVE-2026-4572
SQL Injection in SourceCodester Sales Inventory /view_product.php
Publication date: 2026-03-23
Last updated on: 2026-04-29
Assigner: VulDB
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| ahsanriaz26gmailcom | sales_and_inventory_system | 1.0 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-89 | The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data. |
| CWE-74 | The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
[{'type': 'paragraph', 'content': 'CVE-2026-4572 is a SQL Injection vulnerability found in SourceCodester Sales and Inventory System 1.0, specifically in the file view_product.php within the product search functionality.'}, {'type': 'paragraph', 'content': "The vulnerability occurs because the application does not properly sanitize the 'searchtxt' parameter in HTTP POST requests, allowing an authenticated attacker to inject arbitrary SQL commands."}, {'type': 'paragraph', 'content': 'The injection supports UNION-based, Boolean-based blind, and Time-based blind SQL injection techniques against a MySQL backend database.'}] [1]
How can this vulnerability impact me? :
This vulnerability can have serious impacts including data exfiltration, where attackers retrieve and display sensitive database contents such as user data, orders, and supplier information.
Attackers may also bypass authentication mechanisms by reading admin credentials and can enumerate the database schema to discover tables and columns.
Overall, it poses a critical risk by allowing attackers to fully compromise the backend database through SQL injection in the product search functionality.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
[{'type': 'paragraph', 'content': "This vulnerability can be detected by testing the 'searchtxt' parameter in HTTP POST requests to the /view_product.php page for SQL injection flaws."}, {'type': 'paragraph', 'content': 'One effective method is to use automated tools like sqlmap to test for SQL injection by sending crafted payloads and analyzing responses.'}, {'type': 'list_item', 'content': 'Example sqlmap command to detect the vulnerability: sqlmap -u "http://127.0.0.1:8089/view_product.php" --data "searchtxt=example&Search=Search" --batch -v 6 --risk=3 --cookie "PHPSESSID=YOUR_COOKIE_HERE"'}, {'type': 'list_item', 'content': "Manual testing can be done by injecting payloads such as: searchtxt=example' UNION ALL SELECT CONCAT(0x716b716a71,0x546a6a784f7043416c6e594a7443766e4d45504e45656b48647369494b5a56436554527353464375,0x716a7a7171),NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL#&Search=Search"}, {'type': 'list_item', 'content': "Other payloads include Boolean-based blind injection: searchtxt=-5487' OR 6599=6599#&Search=Search and Time-based blind injection: searchtxt=example' AND (SELECT 9568 FROM (SELECT(SLEEP(5)))oZAR)-- Hfku&Search=Search"}] [1]
What immediate steps should I take to mitigate this vulnerability?
I don't know