Skip to content

XSS / HTML / script injection protection #7

@0gust1

Description

@0gust1

In https://github.com/benallfree/mdsvex-enhanced-images there is some protection in place to escape html characters from the gathered alt attribute.

Even if the attack surface seems quite small (the alt attribute is considered "safe" in Owasp docs), it's a good idea to implement the same (and / or merge the projects): one will never know all the contextual use of this plugin, and in some cases (let's say, an app which accepts user-submitted content without moderation or verification) it could leave some opportunities for evil work.

It also should be noted that as we handle mdsvex files (which can contain code), it's, by design, less secure than more rigid user-contributed content systems.

refs:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestsecurityA feature related to a vulnerability or security concern

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions