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 uploaded malicious plug-in is parsed and the command is executed #15

Closed
afeng2016-s opened this issue Aug 12, 2023 · 1 comment
Closed

Comments

@afeng2016-s
Copy link

Vulnerability information

PerfreeBlog implements the extension plug-in function based on SpringBoot and pf4j. After the plug-in is developed, it is packaged as a jar package, which can be directly installed and used online through the plug-in management of PerfreeBlog background. If an attacker develops a plug-in and inserts malicious code, uploading the malicious plug-in after the malicious code is parsed can trigger command execution.

affected version

<= v3.1.2

vulnerability analysis

  1. Download the latest PerfreeBlog running package and decompress it.
    After the directory is decompressed, run start.bat
    image

2, Access the Web service, initialize the database and administrator account.
image

  1. Make a plug-in with malicious code.
    Plug-in development refer to: https://perfree.gitee.io/plugin-develop/create.html.
    The malicious code is as follows: the calculator pops up when admin/plugin/access/list is accessed.
    image

  2. Upload the plug-in and run.
    image

image

  1. access the admin/plugin/access/list interface and execute the malicious code successfully.
    image
@attritionorg
Copy link

"it is packaged as a jar package, which can be directly installed and used online through the plug-in management of PerfreeBlog background"

So how is this a vulnerability? It requires admin access to then use intended functionality. It's a trusted interface, so if an admin wants to run arbitrary code, there is likely other ways to do that which are intended as well, no?

@perfree perfree closed this as completed Sep 21, 2023
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

3 participants