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

[Bug] Hippo4j anonymous login info leak #1585

Open
3 tasks done
RacerZ-fighting opened this issue Dec 22, 2024 · 0 comments
Open
3 tasks done

[Bug] Hippo4j anonymous login info leak #1585

RacerZ-fighting opened this issue Dec 22, 2024 · 0 comments
Labels
type: bug Something isn't working

Comments

@RacerZ-fighting
Copy link

Search before asking

  • I had searched in the issues and found no similar issues.

Environment

Mac

Hippo4j version

develop

What happened

When attempting to extend Hippo4j with matrix parameters such as ;jsessionid, it is necessary to manually disable the semicolon filtering in the security firewall (e.g., firewall.setAllowSemicolon(true)). However, this may result in unexpected behavior in cn.hippo4j.auth.filter.RewriteUserInfoApiFilter, potentially leading to system information leakage.

How to reproduce

Step1. Rewrite HttpFirewall class to support request URL with semicolon.
image

Step2. Disable the hippo4j.core.auth.enabled option
image

Step3. At this point, accessing hippo4j/v1/cs/auth/users/info/test should theoretically result in a redirection and return information related to the admin user.
image
However, when attempting to add ;jsessionid=xxx to the URL, such as hippo4j/v1/cs/auth/users;jsessionid=xxx/info/test, the information of the test user was exposed.
image

Debug logs

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@RacerZ-fighting RacerZ-fighting added the type: bug Something isn't working label Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant