Skip to content

JavaScript Injection using event attributes #148

@Qendolin

Description

@Qendolin

Script injection is still very easy to achieve.
As mentioned in #66 (comment) you can inject JavaScript via on* attributes.
[aaa onclick=alert('Hacked')]Click Me[/aaa]

I don't think the solution is to blacklist certain attributes. IMO it shouldn't even be possible to set any attributes unless explicitly enabled in a preset. Even a style attribute can be used maliciously.

Furthermore it is not save to allow the creation of an arbitrary html tag. For example some websites might use custom elements which themselves might be exploitable.

I'ld strongly prefer it this library was safe by default.

Metadata

Metadata

Assignees

Labels

P1Moderate IssueenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions