Skip to content

Commit ffd4826

Browse files
committed
Improper-markup-sanitization: disclose Vanilla/htmlLawed 'style' sanitization issue
1 parent 9ad6a6a commit ffd4826

File tree

3 files changed

+31
-15
lines changed

3 files changed

+31
-15
lines changed

Improper-markup-sanitization.md

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,14 @@ I have found and reported markup sanitization related issues in: \
110110
[GitHub](#github), [GitLab](#gitlab),
111111
[Bitbucket](#bitbucket),
112112
[Gogs](#gogs), [Gitea](#gitea), [Redmine](#redmine),
113-
_[TBA 2](#tba-2)_,
113+
[Vanilla Forums](#vanilla),
114114
[YouTrack](#youtrack),
115115
[Upsource](#upsource),
116116
[JIRA](#jira).
117117

118-
Of those, [Bitbucket](#bitbucket), [TBA 2](#tba-2), [YouTrack](#youtrack), and [Upsource](#upsource) issues are not related to unsanitized `class` atribute.
118+
Of those, [Bitbucket](#bitbucket), [Vanilla Forums](#vanilla), [YouTrack](#youtrack), and [Upsource](#upsource) issues are not related to unsanitized `class` atribute.
119119
Note that the first two of those don't satisfy the [prerequisites](#introduction) — Bitbucket does not support HTML markup in Markdown at all, and
120-
███████ ███████ █████████ ██████ ████████████.
120+
Vanilla doesn't have code syntax highlighting.
121121
They managed to fail markup sanitization in other ways, though, and that's the reason for them to be included in this writeup.
122122

123123
See below for the detailed vulnerabilities information, PoC examples and screenshots.
@@ -259,7 +259,6 @@ The HTML specification is maintained by the W3C.
259259

260260
PoC 2:
261261
~~~md
262-
263262
```
264263
#!lolcoad.0000123
265264
lol
@@ -293,26 +292,43 @@ Timeline:
293292
* Incomplete fix deployed (covered only the first PoC): 2017-05-30
294293
* Complete fix deployed: 2017-06-20
295294

296-
### TBA 2
295+
### Vanilla
296+
297+
_Fixed in Vanilla [2.5.0](https://github.com/vanilla/vanilla/tags) / htmlLawed [1.2.1.1](http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/htmLawed_README.htm#s4.3)._
297298

298-
An issue in _TBA 2_ allowed arbitrary user content in `style` attribute (not related to `class` not being sanitized), which could
299+
An issue in Vanilla Forums allowed arbitrary user content in `style` attribute (not related to `class` not being sanitized), which could
299300
be used to obtain any desired look of the page (forging other people content, etc).
300301

301-
![Fullsize message on TBA2](/media/tba2.1.fullsize.png)
302+
User-specified `align` attribute value was inserted into actual `style` attribute, and that was done without proper
303+
sanitization or escaping.
302304

303-
PoC:
304-
```html
305-
TBA
306-
```
305+
The upstream issue was in the HTML sanitizer that they use,
306+
[htmLawed](http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/) (actually, it's [fork](https://github.com/vanilla/htmlawed)).
307+
308+
![Fullsize message on YDN Forums](/media/yahoodevelopers.fullsize.png)
307309

308-
![Fullsize message on TBA2](/media/tba2.2.fullsize.png)
310+
![Fullsize message on LowEndTalk](/media/lowendtalk.fullsize.png)
309311

310312
PoC:
311313
```html
312-
TBA
314+
<div align="center;display:block;position:fixed;left:0;right:0;bottom:0;top:0;z-index:1000;background:white;margin;0">
315+
<p>&nbsp;</p>
316+
<p>&nbsp;</p>
317+
<p><img src="https://s.yimg.com/oo/fe/images/YDN-Logo_1cb4ad89f.png"></p>
318+
<p align="center;font-size:25px">Hello there! Something has gone wrong, we are working on it.</p>
319+
<p align="center;font-size:20px">In the meantime, play a game with us at&nbsp;<a href="http://example.com/">example.com</a>.</p>
320+
</div>
313321
```
314322

315-
_Details TBA._
323+
Timeline:
324+
* Discovered on Vanilla Forums: 2017-03-29
325+
* Reported to Vanilla Operations: 2017-03-29
326+
* Confirmed by Vanilla Operations and redirected to htmlLawed: 2017-03-31
327+
* Confirmed by htmlLawed: 2017-05-15
328+
* Initial fix by htmlLawed: 2017-05-15 (v1.2.1)
329+
* Initial fix by htmlLawed proven incomplete: 2017-05-17 (`align="1&#x3b; background&#x3a; red"`)
330+
* Updated fix by htmlLawed: 2017-05-17 (v1.2.1.1)
331+
* Vanilla Forums 2.5.0 release, containing the fix: 2017-12-23
316332

317333
### YouTrack
318334

@@ -472,7 +488,7 @@ a good one, send me a link, I will include that link here.
472488
473489
Published (partially): 2017-04-13, 9:01 UTC. \
474490
Updated with Bitbucket XSS disclosure: 2017-06-26 15:40 UTC. \
475-
Updated with _TBA 2_ disclosure: _TBA_. \
491+
Updated with Vanilla Forums disclosure: 2018-01-08, 20:50:00 UTC. \
476492
Updated with YouTrack disclosure: 2017-04-25, 9:34 UTC.
477493
478494
If you have any questions to me, contact me over Gitter ([@ChALkeR](https://gitter.im/ChALkeR)) or IRC (ChALkeR@freenode).

media/lowendtalk.fullsize.png

18.7 KB
Loading

media/yahoodevelopers.fullsize.png

37.6 KB
Loading

0 commit comments

Comments
 (0)