Ujcms v8.0.2 has a vulnerability that attacker could spoofing servers with IP addresses.
- Dominant language
- Java
- Stars
- 665
- Forks
- 114
- PR merge metrics
- No merged PRs in 30d
Description
[Vulnerability description]
Ujcms v8.0.2 has a vulnerability that is Reliance on IP Address for Authentication(CWE-291), attacker could spoofing servers with IP addresses and impact log record.
[Vulnerability Type]
CWE-291: Reliance on IP Address for Authentication
[Vendor of Product]
https://gitee.com/ujcms/ujcms
https://github.com/ujcms/ujcms
https://www.ujcms.com/
[Affected Product Code Base]
v8.0.2
[Vulnerability proof]
Condition: tomcat deployment project
the weak java file : src/main/java/com/ujcms/commons/web/Servlets.java
1. The method to get a real client IP by X-Forwarded-For

2. If attacker add a `X-Forwarded-For: 1.1.1.1` in header, the IP list will be `1.1.1.1, 127.0.0.1`, now `getRemoteAddr()` will get the `127.0.0.1`


3. And then find the ip from right to left, the left ip is 1.1.1.1

The IP impersonation is complete
We can see the fake IP address in the log.

many Controllers use this weak method:

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.