Automattic / Automattic/juice

Parser bug, allowing XSS from CSS (On demo)

Open
#388 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.3k
Forks
233
Avg merge
1d 10h
Merged PRs (30d)
8

Description

The following input tested on https://automattic.github.io/juice/
```js
audio{a" onerror=alert(document.domain)>":""}

```
Resulted in the valid XSS payload
```js
": '';">
```
From what I can tell juiceDocument is not affected.

Contributor guide

Open the contributing guide

Research direction

Reproduce the payload on the linked Juice demo and compare its behavior with juiceDocument, which the report says is unaffected. Trace the parser path that turns the style rule into the audio element's style attribute, then add coverage showing that this input cannot produce an executable onerror attribute.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.