| Title | dayrui XunRuiCMS 4.7.4 SQL Injection |
|---|
| Description | SQL injection in the Member template endpoint of dayrui XunRuiCMS 4.7.4 allows an unauthenticated attacker to read arbitrary database records via the catid parameter.
The GET parameter catid of index.php?s=member&c=api&m=template is passed to the template engine without an integer cast. The bundled template template/pc/default/home/search.html contains {module catid=$catid order=hits num=10}; the engine compiles it into a list_tag() call and extracts the where='...' fragment as a raw SQL condition (Fcms/Core/View.php:1008), which App/Cms/Action/Module.php:46 forwards as adj=SQL and View.php:1874 concatenates into the query.
Payload (catid, decoded):
1 where='1=1 AND 1=2 UNION SELECT 1,1,CONCAT(0x7e44422d,database(),0x7e),1,1,CONCAT(0x7e5645522d,@@version,0x7e),1,1,1,1,1,1,1,1,1,1,1 #'
One request returns the database name and version. The same technique reads dr_member (administrator username, password hash, salt); the hash format md5(md5(plain)+salt+md5(plain)) can be cracked offline, which leads to administrator panel access.
The framework's own copy of the method (Fcms/Control/Api/Api.php:390-397) casts catid to an integer list and clears the where key; the Member application copy was never updated, so 4.7.4 stays injectable.
Fix: cast catid to an integer list and drop the where key in App/Member/Controllers/Api.php::template(); in Fcms/Core/View.php::list_tag(), replace the raw where='...' form with a bound field/operator/value. Mitigation: block requests to s=member&c=api&m=template whose catid contains where=, quotes, or comment markers.
Credit: fr3rty |
|---|
| Source | ⚠️ https://github.com/Fr3rty/CVE/blob/main/XunRuiCMS-4.7.4/README.md |
|---|
| User | fr3rty (UID 102650) |
|---|
| Submission | 10/30/2026 16:26 (28 days ago) |
|---|
| Moderation | 11/27/2026 17:31 (28 days later) |
|---|
| Status | Duplicate |
|---|
| VulDB entry | 429671 [dayrui XunRuiCMS up to 4.7.4 Member View.php View catid sql injection] |
|---|
| Points | 0 |
|---|