Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2025-7558 PoC — Code-Projects Voting System 注入漏洞

Source
Associated Vulnerability
Title:Code-Projects Voting System 注入漏洞 (CVE-2025-7558)
Description:Code-Projects Voting System是Code-Projects开源的一个选举系统。 Code-Projects Voting System 1.0版本存在注入漏洞,该漏洞源于文件/admin/positions_add.php中参数description操作不当,可能导致SQL注入攻击。
Description
sql injection PoC for CVE-2025-7558. authored by i-Corner
Readme
# 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" />
File Snapshot

[4.0K] /data/pocs/42306951d420b277fb8cca0fc983d183b9bd1ee5 ├── [ 685] PoC.txt └── [3.0K] README.md 1 directory, 2 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.