Skip to content

Fix XSS vulnerability in jQuery MLKeyboard#27

Open
mBut wants to merge 1 commit into
masterfrom
fix-xss-vulnerability-1602719455991304553
Open

Fix XSS vulnerability in jQuery MLKeyboard#27
mBut wants to merge 1 commit into
masterfrom
fix-xss-vulnerability-1602719455991304553

Conversation

@mBut
Copy link
Copy Markdown
Owner

@mBut mBut commented Mar 27, 2026

Fixed a security vulnerability that allowed XSS through the selector and trigger options in the jQuery MLKeyboard plugin. I modified src/keyboard.js to use safer jQuery selection logic and rebuilt the distribution files. Verified the fix by creating a reproduction case and confirming it no longer executes malicious scripts.


PR created automatically by Jules for task 1602719455991304553 started by @mBut

The plugin was vulnerable to Cross-Site Scripting (XSS) when a malicious
string was passed to the `selector` or `trigger` options. This happened
because strings were passed directly to the jQuery `$()` constructor,
which could result in element creation and execution of scripts if the
string contained HTML.

This change ensures that string inputs for `selector` and `trigger` are
treated strictly as CSS selectors by using `$(document).find(selector)`.

Affected files:
- src/keyboard.js: Updated selection logic.
- jquery.ml-keyboard.js: Rebuilt with the fix.
- jquery.ml-keyboard.min.js: Rebuilt with the fix.

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

👋 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