Skip to content

🛡️ Sentinel: Fix XML Injection and DoS in Sitemap Generator - #431

Open
daxt61 wants to merge 1 commit into
mainfrom
sentinel/fix-sitemap-xml-injection-dos-7064771134980162375
Open

🛡️ Sentinel: Fix XML Injection and DoS in Sitemap Generator#431
daxt61 wants to merge 1 commit into
mainfrom
sentinel/fix-sitemap-xml-injection-dos-7064771134980162375

Conversation

@daxt61

@daxt61 daxt61 commented May 8, 2026

Copy link
Copy Markdown
Owner

This PR addresses a critical security vulnerability in the Sitemap Generator tool where malicious user input could lead to XML injection. Additionally, it implements client-side Denial of Service (DoS) protections by enforcing strict length and structural limits on inputs.

🛡️ Sentinel Security Report

  • 🚨 Severity: HIGH
  • 💡 Vulnerability: XML Injection via unescaped URL and metadata concatenation.
  • 🎯 Impact: Malicious users could inject arbitrary XML tags, potentially breaking sitemap parsers or injecting misleading SEO metadata.
  • 🔧 Fix:
    • Introduced a dedicated escapeXml utility for all dynamic XML fields.
    • Added structural limits (MAX_URLS = 1000).
    • Added string length limits (MAX_URL_LENGTH = 2048, MAX_BULK_INPUT_LENGTH = 50,000).
    • Sanitized state initialization from URL parameters.
  • ✅ Verification:
    • Standalone scripts confirmed < is escaped to &lt;.
    • Playwright screenshots verified the UI displays French error messages when limits are exceeded.
    • Production build (pnpm build) completed successfully.

PR created automatically by Jules for task 7064771134980162375 started by @daxt61

- Implement `escapeXml` to sanitize all user-controlled dynamic fields.
- Enforce resource limits: MAX_URLS (1000), MAX_URL_LENGTH (2048), and MAX_BULK_INPUT_LENGTH (50,000).
- Sanitize `initialData` from URL parameters during state initialization.
- Refactor generator to use `useCallback` and improve accessibility with input-label associations.
- Add localized (French) error feedback for length limit violations.
- Update Sentinel journal with XML injection learnings.

Co-authored-by: daxt61 <254493367+daxt61@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.

@vercel

vercel Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
multitools Ready Ready Preview, Comment May 8, 2026 6:38pm

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