Skip to content

Stricter attribute parsing #175

@craigfrancis

Description

@craigfrancis

In regards to blocking \n and < in attributes:

https://crbug.com/680970

If an opt-in to stricter parsing of attributes is required, maybe a CSP could be used to say that not only will this website url-encode the attribute values (e.g. using %0A instead of \n), but all attribute values will be quoted, e.g.

<img src=not-valid />
<img src="valid" alt='valid' />

As we don't want the attacker providing the opening quote mark themselves:

/path/?q="https://example.com/collect-xss...

As an XSS could add that to the HTML like:

<input name=q value="https://example.com/collect-xss... /> Customer details

This should apply to those who use application/xhtml+xml parsing mode as well :-)

<input name="name" id="name" required="required"  />

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions