A Cracker Barrel vulnerability
The rewards admin panel was a client-side React app whose authentication check could be bypassed by changing the initial authenticated flag in the compiled JavaScript. The backend API also accepted requests without an authorization token, so an attacker could reach admin functionality such as managing rewards and peg values.
eaton-works.com
Published on eaton-works.com
Cracker Barrel catapulted themselves into the news earlier this year with their big logo change controversy. After seeing them in the news so much, a thought came to mind: are they secure?
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the authorisation decision was made only in client-side JavaScript and the API did not require a valid token, so both layers failed to enforce access control.
Impact
The author states nothing sensitive was exposed and no customer data was at risk; the worst case could have been business disruption to the rewards system or inflating one's own rewards, and no write actions were performed.
What the attacker needed
Access to the corporate admin site; ability to edit client-side JavaScript
The fix
The text says Cracker Barrel appeared to have fixed it themselves before the report was answered, though it does not describe the fix; properly, the server should require and validate an authorization token and enforce admin access there.
How it was found
- Find the rewards admin panel and inspect the React app's auth-context.js file
- Note that the initial isAuthenticated value is set in the client code
- Change that value to true in the compiled JavaScript
- Load the site and reach the admin panel
- Observe that the API accepts requests sent without an authorization token
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A website's login check should be enforced by the server, not just by the page shown in your browser. Here the page decided whether you were logged in using a value in its own code, which anyone can edit, and the server behind it did not check for a login token either. So someone could open the admin screens without an account.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.