-
Notifications
You must be signed in to change notification settings - Fork 9
Admin Pages are Open Access for Everybody with simple "Exploit" #49
Comments
@dremerb For the SPAs, I can see only these ways to do it:
If the latter seems an okay solution, I can implement that, but it's all up for the discussion |
Right, makes sense that verifying the HMAC needs the secret. Didn't really think about it after issue got raised. On the other hand, I am still unsure if this needs a fix. Every permission verification in frontend can easily be bypassed in a local copy. And even a backend driven permission check would not solve the "issue" that API requests and page elements are available in the repository. So I think the real question is: Can this even be locked down in a way, that no unauthorized user will ever see it, while maintaining openness of code? Or would your second idea work in such a way? |
Well, it depends. If we think of that as an OSS thing, this doesn't make sense, as you said, because anybody could just clone a repo, remove the check and view the pages. But if the only concern is the deployed application, the second option could work as you suggested (somehow I got confused by thinking asymmetric public keys are used to encrypt the data, not to validate the the right owner of the encrypted message, thanks for clarification). |
Well said. I'm down to listen to your call. If you want to wait for backend code and poke around once that's available, I'm happy to leave this open for now. If you think marking this as "Won't Fix" and moving on is perfectly fine, I see no issue with that as well. To me this thing only really exists, because the user system got a "isAdmin" flag and this was the most trivial way to use it in Frontend. Once backend is updated and documented, no malicious user will spend much time with the frontend anyways - or they do and waste their time. |
I'd advise to keep it open until either this is a concern that needs a fix or there's not much to do |
Applies to all pages in src/views/Admin/
Currently only presence of the
isAdmin
field in the JWT is checked, but the HMAC is never confirmed. By manipulating the token the admin pages are accessible. Absolutely not critical, as every action is validated in the backend and the user's permissions are checked independent from the token.Affected Code:
kacky-eventpage-frontend/src/views/Admin/AdminIndex.jsx
Line 12 in 77302cc
Thanks to janhenning on Discord for this one.
The text was updated successfully, but these errors were encountered: