CVE-2026-3754
SQL Injection in SourceCodester Sales Inventory /add_stock.php
Publication date: 2026-03-08
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-3754 is a SQL injection vulnerability found in SourceCodester Sales and Inventory System version 1.0, specifically in the file add_stock.php. The vulnerability arises because the application does not properly sanitize the 'cost' parameter in HTTP POST requests. This allows an authenticated attacker to inject arbitrary SQL commands into the backend database."}, {'type': 'paragraph', 'content': 'The attack is a time-based blind SQL injection that leverages the MySQL SLEEP() function to cause deliberate delays in server response times. By measuring these delays, an attacker can infer and extract sensitive database information even when no direct error messages or data are returned.'}] [1, 3]
How can this vulnerability impact me? :
[{'type': 'paragraph', 'content': "This vulnerability can allow remote attackers with authentication to manipulate SQL queries through the 'cost' parameter, potentially compromising the confidentiality, integrity, and availability of the system."}, {'type': 'list_item', 'content': 'Attackers can enumerate database schemas, tables, and columns.'}, {'type': 'list_item', 'content': 'Sensitive information such as credentials and customer data can be exfiltrated.'}, {'type': 'list_item', 'content': "The system's data integrity and availability may be affected due to unauthorized SQL command execution."}, {'type': 'paragraph', 'content': 'The exploit is publicly available, making it easier for attackers to target vulnerable systems.'}] [1, 2, 3]
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': 'The vulnerability can be detected by testing the "cost" parameter in the /add_stock.php file for SQL injection, specifically time-based blind SQL injection. An authenticated user can attempt to inject SQL payloads that cause deliberate delays in server response times using the MySQL SLEEP() function.'}, {'type': 'paragraph', 'content': 'A practical approach is to intercept the POST request when adding stock and inject a payload such as: stockid=SD57&name=TestProduct&cost=100 AND (SELECT 1772 FROM (SELECT(SLEEP(5)))wTBq)&sell=150&supplier=TestSupplier&category=TestCategory&Submit=Add'}, {'type': 'paragraph', 'content': 'Using automated tools like sqlmap targeting the "cost" parameter can confirm the vulnerability. For example, sqlmap can be run with a command specifying the vulnerable parameter to detect time-based blind SQL injection.'}] [1, 3]
What immediate steps should I take to mitigate this vulnerability?
No official patch or fix has been provided for this vulnerability.
Immediate mitigation steps include replacing the affected product with an alternative solution that does not have this vulnerability.
Additionally, restricting access to the /add_stock.php functionality to trusted users only and monitoring for suspicious activity may help reduce risk until a fix is available.