Skip to content

[Bug]: Sanitize XHTML from ReqIF files before rendering it  #57

Open

Description

@samatstariongroup

What type of issue is this?

  • Bug report
  • Feature request

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am running the latest version of the reqifviewer
  • I have searched open and closed issues to ensure it has not already been reported

Description

XHTML from the uploaded ReqIF file is rendered with new MarkupString(...) without sanitizing (for example in AttributeValuesComponent, SpecificationDetailsPage and the tree labels). A crafted file can inject script, for example through an onerror attribute, into the page of whoever opens it.

Acceptance criteria

  • All XHTML from attribute values, display names and tree labels goes through one sanitizing helper; no new MarkupString(...) on file content elsewhere.
  • Allow-list based on the XHTML modules ReqIF uses (text, lists, tables, object); scripts, event-handler attributes and javascript: URLs are removed. HtmlSanitizer is already a dependency of Blazor Blueprint.
  • Tests with a malicious fixture (<script>, onerror, javascript: link) prove nothing executable is rendered.

Steps to Reproduce

Load requirements-and-objects.reqifz or ProR_Traceability-Template-v1.0.reqif (reqifviewer.Tests/TestData) and look at the pages mentioned above.

System Configuration

Activity

  1. added
    bugSomething isn't working
    phase-0Improvement plan phase 0: foundation (security, stability, one UI library)
    securitySecurity issue or hardening
    on Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingphase-0Improvement plan phase 0: foundation (security, stability, one UI library)securitySecurity issue or hardening

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions