关联漏洞
描述
sql injection PoC for CVE-2025-7558. authored by i-Corner
介绍
# CVE-2025-7558-PoC
Summary
A vulnerability labeled as critical has been found in code-projects Voting System 1.0. The affected element is an unknown function of the file /admin/positions_add.php. Such manipulation of the argument Description leads to sql injection. This vulnerability is documented as CVE-2025-7558. The attack can be executed remotely. Additionally, an exploit exists.
Details
A vulnerability was found in code-projects Voting System 1.0 and classified as critical. Affected by this issue is an unknown part of the file /admin/positions_add.php. The manipulation of the argument description with an unknown input leads to a sql injection vulnerability. Using CWE to declare the problem leads to CWE-89. The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Impacted is confidentiality, integrity, and availability.
This vulnerability is handled as CVE-2025-7558. The exploitation is known to be easy. The attack may be launched remotely. Technical details as well as a public exploit are known. The MITRE ATT&CK project declares the attack technique as T1505.
The exploit is available and is declared as proof-of-concept. By approaching the search of `inurl:admin/positions_add.php`, it is possible to find vulnerable targets with Google Hacking.
There is no information about possible countermeasures known. It may be suggested to replace the affected object with an alternative product.
The vulnerability is also documented in the vulnerability database at EUVD (EUVD-2025-21289). Entry connected to this vulnerability is available at VDB-225935.
===========================================================================
sql injection PoC for CVE-2025-7558. authored by i-Corner https://github.com/i-Corner
https://github.com/i-Corner/cve/issues/6
i do not take any credit for this work.
CVE-2025-7558
[Voting System In PHP With Source Code - Source Code & Projects](https://code-projects.org/voting-system-in-php-with-source-code/)
Vulnerable file: `/admin/positions_add.php`
Code analysis
In `/admin/positions_add.php`, parameters entered by the user (similar to the description parameter) are directly concatenated into an SQL statement, leading to an SQL injection vulnerability.
```
$description = $_POST['description'];
$max_vote = $_POST['max_vote'];
$sql = "SELECT * FROM positions ORDER BY priority DESC LIMIT 1";
$query = $conn->query($sql);
$row = $query->fetch_assoc();
$priority = $row['priority'] + 1;
$sql = "INSERT INTO positions (description, max_vote, priority) VALUES ('$description', '$max_vote', '$priority')";
if($conn->query($sql)){
```
use `sqlmap` with `PoC.txt` and this command:
`python .\sqlmap.py -r .\PoC.txt --dbs --batch`
<img width="1912" height="604" alt="image" src="https://github.com/user-attachments/assets/98553c71-3023-4df8-ac1a-a52893076436" />
文件快照
[4.0K] /data/pocs/42306951d420b277fb8cca0fc983d183b9bd1ee5
├── [ 685] PoC.txt
└── [3.0K] README.md
0 directories, 2 files
备注
1. 建议优先通过来源进行访问。
2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。