More XSS's in safe mode
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start by tracing safe mode handling for HTML entities and malformed link/image syntax; reproduce the two Markdown inputs in the issue against the referenced commit. Done means both cases render as safe HTML without executable protocols or raw event-handler markup.
Written by the indexing model from the issue text.
Description
Describe the bug
After the patches of #722, I manually found a simple bypass of the HTML entity regex, and ran the fuzzer again to find another HTML corruption.
To Reproduce
- The browser decodes
:to:forming ajavascript:protocol URL (entities can be prefixed with any amount of0's).
[Click me](javascript:alert(origin))
<p><a href="javascript:alert(origin)">Click me</a></p>
- Weird combination of syntax again resulting in raw HTML being output:
<x><svg onload=alert(origin)
<p><x<img src="code><a
></code" alt="" />><svg onload=alert(origin)<img src="code><a
></code" alt="" /></p>
Expected behavior
Safe HTML is output. Maybe use a proper HTML entity decoder to solve the first.
Debug info
Version of library being used: https://github.com/trentm/python-markdown2/commit/ba92f30e9101f485bfd6b2a3178908ee4a82da9f (latest master at time of writing)
- Dominant language
- Python
- Stars
- 2.8k
- Forks
- 459
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 4
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from trentm/python-markdown2
-
Add py.typed marker Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
trentm/python-markdown2#696 ·
-
Bug
Difficulty 4/5 3-5 days Newbie friendliness 55/100
trentm/python-markdown2#707 ·
-
Bug
Difficulty 3/5 1-2 days Newbie friendliness 58/100
trentm/python-markdown2#688 · 4 comments ·
-
Bug
Difficulty 3/5 1-2 days Newbie friendliness 58/100
trentm/python-markdown2#679 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
trentm/python-markdown2#635 · 2 comments ·
All issues in trentm/python-markdown2
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
stephrobert/dsoxlab#238 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
sublimehq/package_control#1780 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
nwg-piotr/nwg-displays#145 ·