Skip to content

Commit 9d18d52

Browse files
committed
Fix SVG Animate FUNCIRI Attribute Bypass — Remote Image Loading via fill/filter/stroke
1 parent 5aba847 commit 9d18d52

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- Fix regression where mail search would fail on non-ascii search criteria (#10121)
66
- Fix regression where some data url images could get ignored/lost (#10128)
7+
- Fix SVG Animate FUNCIRI Attribute Bypass — Remote Image Loading via fill/filter/stroke
78

89
## Release 1.6.14
910

program/lib/Roundcube/rcube_washtml.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,8 @@ private static function is_insecure_tag($node)
550550
return true;
551551
}
552552

553-
return self::attribute_value($node, 'attributeName', '/^(mask|cursor)$/i')
553+
$rx = '/^(mask|cursor|fill|filter|stroke|clip-path|marker-start|marker-end|marker-mid)$/i';
554+
return self::attribute_value($node, 'attributeName', $rx)
554555
&& self::attribute_value($node, 'values', '/url\(/i');
555556
}
556557

tests/Framework/Washtml.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,10 @@ function data_wash_svg_tests()
521521
. ' feel="freeze" dur="1s" /></svg>',
522522
'<svg><!-- animate blocked --></svg>',
523523
],
524+
[
525+
'<svg><animate attributeName="fill" values="url(http://external.site)" dur="1s" begin="0s" fill="freeze" /></svg>',
526+
'<svg><!-- animate blocked --></svg>',
527+
],
524528
];
525529
}
526530

0 commit comments

Comments
 (0)