
CVE-2021-37580的poc
POC for CVE-2021-37580
Vulnerability principle: Apache ShenYu Admin bypass JWT authentication CVE-2021-37580
Usage: python3 CVE-2021-37580.py -u url -n username.txt
For shenyu-admin-2.4.0, vulnerable versions see below:

For shenyu-admin-2.4.1, non-vulnerable versions see below:

Usage: python3 CVE-2021-37580.py -f url.txt -n username.txt

If the script reports an error:
AttributeError: module 'jwt' has no attribute 'encode'
Run the following command:
python3 -m pip uninstall jwt
python3 -m pip uninstall pyjwt
python3 -m pip install pyjwt==1.5.3 --user
This tool is intended only for legally authorized enterprise security construction activities. If you need to test the usability of this tool, please set up your own target environment.
When using this tool for detection, you should ensure that the action complies with local laws and regulations and that sufficient authorization has been obtained. Do not scan unauthorized targets.
If you engage in any illegal behavior while using this tool, you shall bear the corresponding consequences. We will not assume any legal or joint liability.
Before installing and using this tool, please read carefully and fully understand all the terms. Limitation, disclaimer, or other terms that involve your significant rights may be highlighted in bold, underlined, or other forms for your attention.
Unless you have fully read, understood, and accepted all the terms of this agreement, please do not install and use this tool. Your use of this tool or your acceptance of this agreement in any other express or implied manner will be deemed as your reading and agreement to be bound by this agreement.