Skip to content

Fix additional XSS vulnerabilities#911

Merged
boomzero merged 3 commits intodevfrom
fix/xss-additional-escaping
Feb 19, 2026
Merged

Fix additional XSS vulnerabilities#911
boomzero merged 3 commits intodevfrom
fix/xss-additional-escaping

Conversation

@boomzero
Copy link
Member

@boomzero boomzero commented Feb 19, 2026

What does this PR aim to accomplish?:

Fix remaining stored XSS vulnerabilities (follow-up to #910) where unsanitized user-controlled data is inserted via innerHTML, allowing arbitrary script execution.

How does this PR accomplish the above?:

Wrap user-controlled data with escapeHTML() before inserting into innerHTML:

  • Post titles in thread list (Posts[i].Title)
  • Board name in thread view (ResponseData.Data.BoardName)
  • Editor username in reply edit info (Replies[i].EditPerson)
  • UserID and UserNick on profile page
  • Update description in changelog (Data.UpdateContents[j].Description)

By submitting this pull request, I confirm the following:

  1. I have read and understood the contributor's guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented on my proposed changes within the code and I have tested my changes.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the GNU General Public License v3.0
  5. I have squashed any insignificant commits. (git rebase)
  6. I have checked that another pull request for this purpose does not exist.
  7. I have considered and confirmed that this submission will be valuable to others.
  8. I accept that this submission may not be used, and the pull request can be closed at the will of the maintainer.
  9. I give this submission freely and claim no ownership to its content.

  • I have read the above and my PR is ready for review. Check this box to confirm


Summary by cubic

Fixes remaining stored XSS by escaping user-controlled values before inserting via innerHTML. Also bumps version to 3.1.2 and adds release notes.

  • Bug Fixes
    • Escape post titles in thread list
    • Escape board name in thread view
    • Escape editor username in reply edit info
    • Escape UserID and UserNick on profile page
    • Escape update description in changelog

Written for commit e51cb29. Summary will update on new commits.

Sanitize user-controlled data with escapeHTML() before innerHTML insertion:
- Post titles in thread list
- Board name in thread view
- EditPerson username in reply edit info
- UserID and UserNick on profile page
- Update description in changelog

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hendragon-bot hendragon-bot bot added the user-script This issue or pull request is related to the main user script label Feb 19, 2026
@boomzero boomzero merged commit 103424b into dev Feb 19, 2026
6 checks passed
@boomzero boomzero deleted the fix/xss-additional-escaping branch February 19, 2026 09:26
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 3 files (changes from recent commits).

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="package.json">

<violation number="1" location="package.json:3">
P2: Avoid manual version bumps; version numbers are managed by the automated UpdateVersion workflow, so this change will be overwritten and can cause version sync issues.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

{
"name": "xmoj-script",
"version": "3.1.1",
"version": "3.1.2",
Copy link

@cubic-dev-ai cubic-dev-ai bot Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Avoid manual version bumps; version numbers are managed by the automated UpdateVersion workflow, so this change will be overwritten and can cause version sync issues.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At package.json, line 3:

<comment>Avoid manual version bumps; version numbers are managed by the automated UpdateVersion workflow, so this change will be overwritten and can cause version sync issues.</comment>

<file context>
@@ -1,6 +1,6 @@
 {
   "name": "xmoj-script",
-  "version": "3.1.1",
+  "version": "3.1.2",
   "description": "an improvement script for xmoj.tech",
   "main": "AddonScript.js",
</file context>
Fix with Cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S user-script This issue or pull request is related to the main user script

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant