Skip to content

fix: Implement Glasswing Mythos - August remediation - #7802

Merged
Bill Dengler (codeofdusk) merged 3 commits into
mainfrom
users/v-jitendjain/GlasswingMythosRemediation
Aug 19, 2026
Merged

fix: Implement Glasswing Mythos - August remediation#7802
Bill Dengler (codeofdusk) merged 3 commits into
mainfrom
users/v-jitendjain/GlasswingMythosRemediation

Conversation

@v-jitendjain

@v-jitendjain v-jitendjain commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Details

There is a Sev 25 ICM https://portal.microsofticm.com/imp/v5/incidents/details/850008679/summary which needs immediate attention.

Motivation

The defect is in link(), both the href and text are interpolated into HTML without escaping, unlike every other field in this formatter (snippet, howToFixSection, relatedPaths all use escape). This allows attacker-controlled values from document.title, document.URL, and result.selector to inject markup (CWE-79).

Context

• href is now escaped via escape(href) before being placed inside the href="..." attribute. This neutralizes characters like ", <, >, and & that could otherwise break out of the attribute context and inject arbitrary HTML/script.
• text is now escaped when provided (escape(text)), matching the treatment already given to snippets, related paths, and how-to-fix text in this same formatter.
• Fallback preserved: when text is empty, the escaped href is reused as the visible text, so behavior is unchanged for the non-malicious case.

Pull request checklist

  • Addresses an existing issue: #0000
  • Ran yarn fastpass
  • Added/updated relevant unit test(s) (and ran yarn test)
  • Verified code coverage for the changes made. Check coverage report at: <rootDir>/test-results/unit/coverage
  • PR title AND final merge commit title both start with a semantic tag (fix:, chore:, feat(feature-name):, refactor:). See CONTRIBUTING.md.
  • (UI changes only) Added screenshots/GIFs to description above
  • (UI changes only) Verified usability with NVDA/JAWS

@v-jitendjain
v-jitendjain requested a review from a team as a code owner August 13, 2026 09:32
@v-jitendjain v-jitendjain changed the title Implement Glasswing Mythos - August remediation Fix: Implement Glasswing Mythos - August remediation Aug 13, 2026
@v-jitendjain
v-jitendjain requested a lite review from Copilot August 13, 2026 09:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR remediates an HTML injection/XSS risk in the HTML issue-filing formatter by ensuring user-controlled link content is HTML-escaped before being interpolated into generated markup.

Changes:

  • Escape href before inserting it into the <a href="..."> attribute.
  • Escape link visible text (and preserve the previous fallback behavior when text is empty/undefined).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/issue-filing/common/markup/html-formatter.ts
@v-jitendjain v-jitendjain changed the title Fix: Implement Glasswing Mythos - August remediation fix: Implement Glasswing Mythos - August remediation Aug 13, 2026
@v-jitendjain

Copy link
Copy Markdown
Contributor Author

\azp run

@v-jitendjain

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
1 pipeline(s) were filtered out due to trigger conditions.

@codeofdusk
Bill Dengler (codeofdusk) merged commit 276980c into main Aug 19, 2026
3 checks passed
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.

4 participants