Skip to content

πŸ”’ Sentinel: [HIGH] Fix XSS vulnerabilities in workout and history pages#74

Open
longestmt wants to merge 1 commit intomainfrom
sentinel-fix-xss-workout-history-3442407995150504058
Open

πŸ”’ Sentinel: [HIGH] Fix XSS vulnerabilities in workout and history pages#74
longestmt wants to merge 1 commit intomainfrom
sentinel-fix-xss-workout-history-3442407995150504058

Conversation

@longestmt
Copy link
Copy Markdown
Owner

🚨 Severity: HIGH
πŸ’‘ Vulnerability: Stored Cross-Site Scripting (XSS) via unsanitized user-controllable input (e.g., plan names, day names, exercise names, equipment strings) rendered directly into innerHTML strings in src/pages/workout.js and src/pages/history.js.
🎯 Impact: An attacker could execute arbitrary JavaScript within a victim's browser context by crafting a malicious plan, day, or custom exercise name and importing it via the application's data functionality. This breaks security boundaries and exposes IndexedDB data.
πŸ”§ Fix: Wrapped all previously unescaped template variables in the affected UI functions with the centralized escapeHTML() utility from src/utils/sanitize.js.
βœ… Verification: Ran pnpm build and Native Node Tests to confirm regressions weren't introduced and syntax is valid. Verified XSS mitigation logic behavior.


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

Fixed multiple Stored Cross-Site Scripting (XSS) vulnerabilities in `src/pages/history.js` and `src/pages/workout.js`. Several user-controlled variables (e.g., plan names, day names, exercise names, muscle groups) were being directly interpolated into `innerHTML` strings without prior sanitization. This allowed malicious payloads to be injected via UI input or imported JSON data and executed within the application. All unescaped template interpolations have now been wrapped with the existing `escapeHTML()` utility to securely sanitize the inputs before DOM insertion.

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