Skip to content

πŸ›‘οΈ Sentinel: [HIGH] Fix XSS in workout and history pages#97

Open
longestmt wants to merge 1 commit intomainfrom
sentinel/xss-workout-history-2672050732105551847
Open

πŸ›‘οΈ Sentinel: [HIGH] Fix XSS in workout and history pages#97
longestmt wants to merge 1 commit intomainfrom
sentinel/xss-workout-history-2672050732105551847

Conversation

@longestmt
Copy link
Copy Markdown
Owner

🚨 Severity: HIGH
πŸ’‘ Vulnerability: Multiple Cross-Site Scripting (XSS) vulnerabilities in the active workout and workout history views due to user-provided data (plan names, exercise names, dates) being injected directly into innerHTML using unescaped template literals. Also missed sanitization on data- attributes creating a risk for attribute breakout XSS.
🎯 Impact: An attacker or a malicious shared plan JSON could execute arbitrary JavaScript in the context of the user's application, potentially leading to unauthorized data access or session manipulation.
πŸ”§ Fix: Wrapped all identified vulnerable interpolation points in src/pages/workout.js and src/pages/history.js with the escapeHTML() utility, ensuring data is safely rendered in the DOM.
βœ… Verification: Successfully ran pnpm build and executed a node -c syntax check to ensure there are no compilation errors. Checked that no tests fail as a result of the changes.


PR created automatically by Jules for task 2672050732105551847 started by @longestmt

This commit fixes multiple Cross-Site Scripting (XSS) vulnerabilities in `src/pages/history.js` and `src/pages/workout.js`. Several user-controlled variables, including workout day names, dates, plan names, exercise names, and exercise equipment were being directly interpolated into `innerHTML` using template strings without sanitization.

All of these identified insertion points are now correctly wrapped with `escapeHTML()`. In addition to text content, HTML attributes interpolating user input (such as `data-swap-name`) are also safely sanitized.

Co-authored-by: longestmt <1509654+longestmt@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

πŸ‘‹ Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a πŸ‘€ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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

Successfully merging this pull request may close these issues.

1 participant