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

[Discussion] How to systematically deal with "auth bypass" issues #1953

Open
lprimak opened this issue Jan 12, 2025 · 3 comments
Open

[Discussion] How to systematically deal with "auth bypass" issues #1953

lprimak opened this issue Jan 12, 2025 · 3 comments

Comments

@lprimak
Copy link
Contributor

lprimak commented Jan 12, 2025

Discussion

Currently, every few weeks, Shiro projects receives a security vulnerability report. All of these reports are very similar in nature, but only slightly vary.

The themes are as follows:

  • Authentication directives do not work exactly as Spring does, thus leading to confusion and perceived as auth bypass
  • Some obscure characters and URL encoding or upper/lower-case lead to perceived auth bypass and confusion

We need to figure out what to do with those reports.
Currently, there isn't even an agreement whether these are or are not a true security issues.

Proposal

  • Update documentation with a big disclaimer that the Ant pattern that's used in Shiro is not the same as Spring, so it can be easily linked to when security reports come in referencing this.
  • Put the same disclaimer into security vulnerability issue template.
  • URLdecode all incoming URLs, and then disallow any non-alphanumeric characters that go into authentication matching algorighm.

Please discuss. Thank you

@fpapon
Copy link
Member

fpapon commented Jan 13, 2025

Thank @lprimak for opening this discussion.
Agreed with point 1 and 2 of the proposal. About the point 3, we need to be careful about the backward compatibility and to not breaking changes.

@lprimak
Copy link
Contributor Author

lprimak commented Jan 13, 2025

Do we have any way to verify backwards-compatibility of any changes such as this?

How about secure-by-default and ability to disable either URLdecode or special character rejection via a flag to the filter, specified in shiro.ini?
Basically a feature flag that can be disabled?

@fpapon
Copy link
Member

fpapon commented Jan 14, 2025

Yes I think the feature flag can be a good option. When I am talking about backward compatibility it's about the behavior with the same ini config file for the user.
Agreed with the secure-by-default, it's a good way but any default changes should be well documented and a part of a major version.
Thoughts?

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

2 participants