Article View: linux.debian.bugs.dist
Article #5942Bug#1155011: roundcube: Multiple security vulnerabilities
From: Guilhem Moulin
Date: Tue, 24 Nov 2026 15:00
Date: Tue, 24 Nov 2026 15:00
1503 lines
59100 bytes
59100 bytes
--uwq1sS2Q7Qe7BNAm
Content-Type: multipart/mixed; boundary="MycHVAauu3zZK0TQ"
Content-Disposition: inline
--MycHVAauu3zZK0TQ
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Hi,
On Mon, 23 Nov 2026 at 16:20:18 +0100, Guilhem Moulin wrote:
> Roundcube webmail upstream has just released 1.6.22 [0] which fixes a
> new batch of security vulnerabilities:
> [=E2=80=A6]
Here is a tested debdiff for these issues. As for the previous uploads, I
suggest to follow 1.6.x (upstream's current LTS release) for trixie-securit=
y.
The upstream diff [0] is targeted anyway. Debusine result:
https://debusine.debian.net/debian/developers/work-request/1654428/
However I start to question whether roundcube is suitable for Debian
stable at the moment given the current trend of a new security release
every few weeks with a dozen vulnerabilities each time :-( I hope it'll
calm down soon as it doesn't feel sustainable even though the debdiffs
are short and straightforward.
Cheers,
--=20
Guilhem.
[0] https://github.com/roundcube/roundcubemail/compare/1.6.21...1.6.22
--MycHVAauu3zZK0TQ
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment; filename=roundcube.debdiff
Content-Transfer-Encoding: quoted-printable
diffstat for roundcube-1.6.21+dfsg roundcube-1.6.22+dfsg
CHANGELOG.md =
| 15 +
debian/changelog =
| 24 ++
debian/patches/Avoid-dependency-on-new-package-mlocati-ip-lib.patch =
| 12 -
debian/patches/Fix-FTBFS-with-phpunit-11.patch =
| 116 +++++-----
debian/patches/Fix-IPv4-hex-nip.io-style-parsing-on-32-bits-platforms.patc=
h | 2=20
debian/patches/Tests-Use-mocked-Guzzle-client-in-Modcss-action-test.patch =
| 2=20
plugins/managesieve/lib/Roundcube/rcube_sieve_script.php =
| 9=20
plugins/password/drivers/ximss.php =
| 23 +
program/actions/mail/index.php =
| 6=20
program/actions/utils/modcss.php =
| 8=20
program/lib/Roundcube/rcube_image.php =
| 4=20
program/lib/Roundcube/rcube_imap_generic.php =
| 8=20
program/lib/Roundcube/rcube_smtp.php =
| 8=20
program/lib/Roundcube/rcube_spellchecker.php =
| 6=20
program/lib/Roundcube/rcube_tnef_decoder.php =
| 3=20
program/lib/Roundcube/rcube_utils.php =
| 2=20
program/lib/Roundcube/rcube_washtml.php =
| 19 +
public_html/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php =
| 9=20
public_html/plugins/password/drivers/ximss.php =
| 23 +
tests/Actions/Mail/Index.php =
| 26 ++
tests/Actions/Utils/Modcss.php =
| 5=20
tests/Framework/TnefDecoder.php =
| 19 +
tests/Framework/Utils.php =
| 3=20
tests/Framework/Washtml.php =
| 4=20
24 files changed, 261 insertions(+), 95 deletions(-)
diff -Nru roundcube-1.6.21+dfsg/CHANGELOG.md roundcube-1.6.22+dfsg/CHANGELO=
G.md
--- roundcube-1.6.21+dfsg/CHANGELOG.md 2026-11-09 12:53:01.000000000 +0100
+++ roundcube-1.6.22+dfsg/CHANGELOG.md 2026-11-23 12:17:59.000000000 +0100
@@ -2,6 +2,21 @@
=20
## Unreleased
=20
+- Security: Fix (again) HTTP request injection via the spellcheck ATD back=
end
+- Security: Fix CSS-scoping bypass via html comments in inline style
+- Security: Fix remote content blocking bypass via CSS comments in SVG Fun=
cIRI attributes
+- Security: Fix CSS-scoping bypass via a direct access to CSS proxy and mu=
ltiple style links
+- Security: Fix response disclosure in the CSS proxy using leading whitesp=
ace/BOM
+- Security: Fix namespace-prefixed attribute bypass of the washtml attribu=
te allowlist (PHP < 8.4)
+- Security: Fix (again) bug where insecure attachment content (PDF/PostScr=
ipt/SVG) was passed to ImageMagick
+- Security: Fix sieve script injection via a comparator name
+- Security: Fix DoS via uncapped MAPI multi-value loop in rcube_tnef_decod=
er
+- Security: Fix XML injection in XIMSS driver of the password plugin
+- Security: Fix falling back to insecure IMAP/SMTP/Managesieve connection =
when TLS is configured but no capability reported
+- Security: Fix Sieve script injection via the body/address/envelope part =
fields
+
+## Release 1.6.21
+
- Security: Fix open redirect via IMAP error recovery on attachment get
- Security: Fix so Received: header includes only trusted hostname and for=
warded IP from a trusted proxy
- Security: Fix bug where some managesieve destructive actions could have =
been triggered cross-site via GET
diff -Nru roundcube-1.6.21+dfsg/debian/changelog roundcube-1.6.22+dfsg/debi=
an/changelog
--- roundcube-1.6.21+dfsg/debian/changelog 2026-11-15 19:45:19.000000000 +0=
100
+++ roundcube-1.6.22+dfsg/debian/changelog 2026-11-24 15:14:03.000000000 +0=
100
@@ -1,3 +1,27 @@
+roundcube (1.6.22+dfsg-0+deb13u1) trixie-security; urgency=3Dhigh
+
+ * New upstream security and bugfix release (closes: #1155011).
+ + Fix (again) HTTP request injection via the spellcheck ATD backend.
+ + Fix CSS-scoping bypass via html comments in inline style.
+ + Fix remote content blocking bypass via CSS comments in SVG FuncIRI
+ attributes.
+ + Fix CSS-scoping bypass via a direct access to CSS proxy and multiple
+ style links.
+ + Fix response disclosure in the CSS proxy using leading whitespace/BO=
M.
+ + Fix namespace-prefixed attribute bypass of the washtml attribute
+ allowlist.
+ + Fix (again) bug where insecure attachment content (PDF/PostScript/SV=
G)
+ was passed to ImageMagick.
+ + Fix sieve script injection via a comparator name.
+ + Fix DoS via uncapped MAPI multi-value loop in rcube_tnef_decoder.
+ + Fix XML injection in XIMSS driver of the password plugin.
+ + Fix falling back to insecure IMAP/SMTP/Managesieve connection when T=
LS
+ is configured but no capability reported.
+ + Fix Sieve script injection via the body/address/envelope part fields.
+ * Refresh d/patches.
+
+ -- Guilhem Moulin <guilhem@debian.org> Tue, 24 Nov 2026 15:14:03 +0100
+
roundcube (1.6.21+dfsg-0+deb13u1) trixie-security; urgency=3Dhigh
=20
* New upstream security and bugfix release (closes: #1153803).
diff -Nru roundcube-1.6.21+dfsg/debian/patches/Avoid-dependency-on-new-pack=
age-mlocati-ip-lib.patch roundcube-1.6.22+dfsg/debian/patches/Avoid-depende=
ncy-on-new-package-mlocati-ip-lib.patch
--- roundcube-1.6.21+dfsg/debian/patches/Avoid-dependency-on-new-package-ml=
ocati-ip-lib.patch 2026-11-15 19:45:19.000000000 +0100
+++ roundcube-1.6.22+dfsg/debian/patches/Avoid-dependency-on-new-package-ml=
ocati-ip-lib.patch 2026-11-24 15:14:03.000000000 +0100
@@ -30,7 +30,7 @@
"require-dev": {
"phpunit/phpunit": "^9"
diff --git a/program/lib/Roundcube/rcube_utils.php b/program/lib/Roundcube=
/rcube_utils.php
-index 936de2e..d5aa80d 100644
+index 7c95bfb..15c7b61 100644
--- a/program/lib/Roundcube/rcube_utils.php
+++ b/program/lib/Roundcube/rcube_utils.php
@@ -1,9 +1,5 @@
@@ -297,10 +297,10 @@
=20
return null;
diff --git a/tests/Framework/Utils.php b/tests/Framework/Utils.php
-index d3208a0..ba7cda6 100644
+index 6da190a..ea164a2 100644
--- a/tests/Framework/Utils.php
+++ b/tests/Framework/Utils.php
-@@ -590,6 +590,86 @@ class Framework_Utils extends TestCase
+@@ -593,6 +593,86 @@ class Framework_Utils extends TestCase
}
}
=20
@@ -387,7 +387,7 @@
/**
* Test is_local_url()
*
-@@ -609,12 +689,17 @@ class Framework_Utils extends TestCase
+@@ -612,12 +692,17 @@ class Framework_Utils extends TestCase
return [
// Local hosts
['https://127.0.0.1', true],
@@ -405,7 +405,7 @@
['//127.0.0.1', true],
['http://localhost', true],
['http://localhost.localdomain', true],
-@@ -637,6 +722,8 @@ class Framework_Utils extends TestCase
+@@ -640,6 +725,8 @@ class Framework_Utils extends TestCase
['http://x.0a000001.nip.io/', true],
['http://x.c0a80101.nip.io/', true],
['http://x.a9fea9fe.nip.io/', true],
@@ -414,7 +414,7 @@
['http://x.0-0-0-0-0-0-0-0-1.sslip.io/', true],
['http://0-0-0-0-0-0-0-0-1.sslip.io/', true],
['http://metadata.google.internal', true],
-@@ -662,6 +749,7 @@ class Framework_Utils extends TestCase
+@@ -665,6 +752,7 @@ class Framework_Utils extends TestCase
['http://20.0.0.1.nip.io.', false],
['http://www-20-0-0-1.nip.io', false],
['http://40b01609.nip.io/', false],
diff -Nru roundcube-1.6.21+dfsg/debian/patches/Fix-FTBFS-with-phpunit-11.pa=
tch roundcube-1.6.22+dfsg/debian/patches/Fix-FTBFS-with-phpunit-11.patch
--- roundcube-1.6.21+dfsg/debian/patches/Fix-FTBFS-with-phpunit-11.patch 20=
26-11-15 19:45:19.000000000 +0100
+++ roundcube-1.6.22+dfsg/debian/patches/Fix-FTBFS-with-phpunit-11.patch 20=
26-11-24 15:14:03.000000000 +0100
@@ -4219,7 +4219,7 @@
}
}
diff --git a/tests/Actions/Mail/Index.php b/tests/Actions/Mail/Index.php
-index 5a5dbe6..be0f3a8 100644
+index 76bc6d6..7ef59e9 100644
--- a/tests/Actions/Mail/Index.php
+++ b/tests/Actions/Mail/Index.php
@@ -1,9 +1,14 @@
@@ -4410,7 +4410,7 @@
=20
$this->assertDoesNotMatchRegularExpression('/data:text/', $washed=
, "Remove data:text/html links");
$this->assertDoesNotMatchRegularExpression('/vbscript:/', $washed=
, "Remove vbscript: links");
-@@ -475,12 +480,13 @@ class Actions_Mail_Index extends ActionTestCase
+@@ -499,12 +504,13 @@ class Actions_Mail_Index extends ActionTestCase
* Test washtml class on non-unicode characters (#1487813)
* @group mbstring
*/
@@ -4426,7 +4426,7 @@
=20
$this->assertMatchesRegularExpression('/<p>(=D1=81=D0=B8=D0=BC=D0=
=B2=D0=BE=D0=BB|=D1=81=D0=B8=D0=BC=D0=BE=D0=BB)<\/p>/', $washed, "Remove no=
n-unicode characters from HTML message body");
}
-@@ -490,7 +496,7 @@ class Actions_Mail_Index extends ActionTestCase
+@@ -514,7 +520,7 @@ class Actions_Mail_Index extends ActionTestCase
*/
function test_meta_insertion()
{
@@ -4435,7 +4435,7 @@
=20
$meta =3D '<meta charset=3D"'.RCUBE_CHARSET.'" />';
$args =3D [
-@@ -500,27 +506,27 @@ class Actions_Mail_Index extends ActionTestCase
+@@ -524,27 +530,27 @@ class Actions_Mail_Index extends ActionTestCase
];
=20
$body =3D '<html><head><meta charset=3D"iso-8859-1_X"></head><b=
ody>Test1<br>Test2';
@@ -4469,7 +4469,7 @@
$this->assertTrue(strpos($washed, "<html><head>$meta</head>") =3D=
=3D=3D 0, "Meta tag insertion (6)");
$this->assertTrue(strpos($washed, "Test2</body>") > 0, "Meta tag =
insertion (7)");
}
-@@ -530,13 +536,13 @@ class Actions_Mail_Index extends ActionTestCase
+@@ -554,13 +560,13 @@ class Actions_Mail_Index extends ActionTestCase
*/
function test_plaintext()
{
@@ -4486,7 +4486,7 @@
=20
$this->assertMatchesRegularExpression(
'/<a href=3D"mailto:nobody@roundcube.net" onclick=3D"return r=
cmail.command\(\'compose\',\'nobody@roundcube.net\',this\)">nobody@roundcub=
e.net<\/a>/',
-@@ -560,7 +566,7 @@ class Actions_Mail_Index extends ActionTestCase
+@@ -584,7 +590,7 @@ class Actions_Mail_Index extends ActionTestCase
*/
function test_mailto()
{
@@ -4495,7 +4495,7 @@
=20
$part =3D $this->get_html_part('src/mailto.txt');
$params =3D ['container_id' =3D> 'foo', 'safe' =3D> false];
-@@ -579,10 +585,10 @@ class Actions_Mail_Index extends ActionTestCase
+@@ -603,10 +609,10 @@ class Actions_Mail_Index extends ActionTestCase
*/
function test_html_comments()
{
@@ -4508,7 +4508,7 @@
=20
// #1487759
$this->assertMatchesRegularExpression('|<p>test1</p>|', $washed, =
"Buggy HTML comments");
-@@ -595,17 +601,17 @@ class Actions_Mail_Index extends ActionTestCase
+@@ -619,17 +625,17 @@ class Actions_Mail_Index extends ActionTestCase
*/
public function test_html_links()
{
@@ -4529,7 +4529,7 @@
=20
// allow external links, add target and noreferrer
$this->assertStringContainsString('<a href=3D"https://roundcube.n=
et"', $body);
-@@ -618,10 +624,10 @@ class Actions_Mail_Index extends ActionTestCase
+@@ -642,10 +648,10 @@ class Actions_Mail_Index extends ActionTestCase
*/
public function test_html_link_xss()
{
@@ -6403,7 +6403,7 @@
}
}
diff --git a/tests/Actions/Utils/Modcss.php b/tests/Actions/Utils/Modcss.p=
hp
-index 1081886..2b40f55 100644
+index 7123f44..dc00eab 100644
--- a/tests/Actions/Utils/Modcss.php
+++ b/tests/Actions/Utils/Modcss.php
@@ -1,9 +1,14 @@
@@ -9895,7 +9895,7 @@
=20
$this->assertEquals($expected, $html);
diff --git a/tests/Framework/TnefDecoder.php b/tests/Framework/TnefDecoder=
=2Ephp
-index ff3bfe9..73d6f40 100644
+index 302b992..40509d0 100644
--- a/tests/Framework/TnefDecoder.php
+++ b/tests/Framework/TnefDecoder.php
@@ -1,11 +1,15 @@
@@ -9944,7 +9944,7 @@
$result =3D $tnef->decompress($body, true);
=20
$this->assertCount(0, $result['attachments']);
-@@ -135,7 +139,7 @@ class Framework_TnefDecoder extends PHPUnit\Framework\=
TestCase
+@@ -154,7 +158,7 @@ class Framework_TnefDecoder extends PHPUnit\Framework\=
TestCase
function test_rtf2text()
{
$body =3D file_get_contents(TESTS_DIR . 'src/sample.rtf');
@@ -10064,7 +10064,7 @@
$idents =3D $user->list_identities();
=20
diff --git a/tests/Framework/Utils.php b/tests/Framework/Utils.php
-index 6285052..d3208a0 100644
+index f8d996d..6da190a 100644
--- a/tests/Framework/Utils.php
+++ b/tests/Framework/Utils.php
@@ -1,11 +1,15 @@
@@ -10295,7 +10295,7 @@
$this->assertSame("#rcmbody { color: red; }", $mod);
=20
$style =3D 'body { background:url(alert('URL!')); }';
-@@ -360,7 +369,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -363,7 +372,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
:root * { color: red; }
:root > * { top: 0; }
';
@@ -10304,7 +10304,7 @@
=20
$this->assertStringContainsString('#rc .testone', $mod);
$this->assertStringContainsString('#rc .testthree.testfour', $mod=
);
-@@ -378,24 +387,24 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
+@@ -381,24 +390,24 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
=20
function test_xss_entity_decode()
{
@@ -10334,7 +10334,7 @@
{
return [
[
-@@ -470,9 +479,10 @@ class Framework_Utils extends PHPUnit\Framework\TestC=
ase
+@@ -473,9 +482,10 @@ class Framework_Utils extends PHPUnit\Framework\TestC=
ase
*
* @dataProvider data_parse_css_block
*/
@@ -10346,7 +10346,7 @@
}
=20
/**
-@@ -487,7 +497,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -490,7 +500,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
];
=20
foreach ($data as $text =3D> $res) {
@@ -10355,7 +10355,7 @@
$this->assertSame($res, $result);
}
}
-@@ -500,7 +510,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -503,7 +513,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
$data =3D ['', 'a,b,c', 'a', ',', ',a'];
=20
foreach ($data as $text) {
@@ -10364,7 +10364,7 @@
$this->assertSame(explode(',', $text), $result);
}
}
-@@ -515,7 +525,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -518,7 +528,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
];
=20
foreach ($input as $idx =3D> $value) {
@@ -10373,7 +10373,7 @@
}
=20
$input =3D [
-@@ -523,7 +533,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -526,7 +536,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
];
=20
foreach ($input as $idx =3D> $value) {
@@ -10382,7 +10382,7 @@
}
}
=20
-@@ -533,13 +543,13 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
+@@ -536,13 +546,13 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
function test_get_input_string()
{
$_GET =3D [];
@@ -10399,7 +10399,7 @@
}
=20
/**
-@@ -547,20 +557,20 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
+@@ -550,20 +560,20 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
*/
function test_is_simple_string()
{
@@ -10434,7 +10434,7 @@
}
=20
/**
-@@ -575,7 +585,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -578,7 +588,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
];
=20
foreach ($test as $v) {
@@ -10443,7 +10443,7 @@
$this->assertSame($v[2], $result);
}
}
-@@ -680,7 +690,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -683,7 +693,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
];
=20
foreach ($test as $datetime =3D> $ts) {
@@ -10452,7 +10452,7 @@
$this->assertSame($ts, $result, "Error parsing date: $datetim=
e");
}
}
-@@ -707,7 +717,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -710,7 +720,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
];
=20
foreach ($test as $datetime =3D> $ts) {
@@ -10461,7 +10461,7 @@
$this->assertSame($ts, $result ? $result->format('Y-m-d') : f=
alse, "Error parsing date: $datetime");
}
=20
-@@ -717,7 +727,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -720,7 +730,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
];
=20
foreach ($test as $datetime =3D> $ts) {
@@ -10470,7 +10470,7 @@
$this->assertSame($ts, $result ? $result->format('Y-m-d H:i:s=
') : false, "Error parsing date: $datetime");
}
=20
-@@ -726,7 +736,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -729,7 +739,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
];
=20
foreach ($test as $datetime =3D> $ts) {
@@ -10479,7 +10479,7 @@
$this->assertSame($ts, $result ? $result->format('Y-m-d H:i:s=
O') : false, "Error parsing date: $datetime");
}
}
-@@ -736,17 +746,17 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
+@@ -739,17 +749,17 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
*/
function test_anytodatetime_timezone()
{
@@ -10500,7 +10500,7 @@
if ($result) $result->setTimezone($tz); // move to target ti=
mezone for comparison
$this->assertSame($ts, $result ? $result->format('Y-m-d H:i')=
: false, "Error parsing date: $datetime");
}
-@@ -765,7 +775,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -768,7 +778,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
];
=20
foreach ($test as $data) {
@@ -10509,7 +10509,7 @@
$this->assertSame($data[2], $result, "Error formatting date: =
" . $data[0]);
}
}
-@@ -784,7 +794,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -787,7 +797,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
];
=20
foreach ($test as $input =3D> $output) {
@@ -10518,7 +10518,7 @@
$this->assertSame($output, $result);
}
}
-@@ -809,7 +819,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -812,7 +822,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
];
=20
foreach ($test as $input =3D> $output) {
@@ -10527,7 +10527,7 @@
$this->assertSame($output, $result, "Error normalizing '$inpu=
t'");
}
}
-@@ -832,7 +842,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -835,7 +845,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
];
=20
foreach ($test as $idx =3D> $params) {
@@ -10536,7 +10536,7 @@
$this->assertSame($params[2], $result, "words_match() at inde=
x $idx");
}
}
-@@ -858,7 +868,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -861,7 +871,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
}
=20
foreach ($test as $input =3D> $output) {
@@ -10545,7 +10545,7 @@
$this->assertSame($output, $result);
}
}
-@@ -868,17 +878,17 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
+@@ -871,17 +881,17 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
*/
function test_random_bytes()
{
@@ -10569,7 +10569,7 @@
{
=20
/*
-@@ -915,9 +925,10 @@ class Framework_Utils extends PHPUnit\Framework\TestC=
ase
+@@ -918,9 +928,10 @@ class Framework_Utils extends PHPUnit\Framework\TestC=
ase
* @param string $encoded Encoded email address
* @dataProvider data_idn_convert
*/
@@ -10581,7 +10581,7 @@
}
=20
/**
-@@ -927,9 +938,10 @@ class Framework_Utils extends PHPUnit\Framework\TestC=
ase
+@@ -930,9 +941,10 @@ class Framework_Utils extends PHPUnit\Framework\TestC=
ase
* @param string $encoded Encoded email address
* @dataProvider data_idn_convert
*/
@@ -10593,7 +10593,7 @@
}
=20
/**
-@@ -937,14 +949,14 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
+@@ -940,14 +952,14 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
*/
function test_idn_to_ascii_special()
{
@@ -10611,7 +10611,7 @@
{
return [
['%z', 'hostname', 'hostname'],
-@@ -959,15 +971,16 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
+@@ -962,15 +974,16 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
*
* @dataProvider data_parse_host
*/
@@ -10630,7 +10630,7 @@
{
return [
[['hostname', null, null], ['hostname', null, null]],
-@@ -990,15 +1003,16 @@ class Framework_Utils extends PHPUnit\Framework\Tes=
tCase
+@@ -993,15 +1006,16 @@ class Framework_Utils extends PHPUnit\Framework\Tes=
tCase
*
* @dataProvider data_parse_host_uri
*/
@@ -10649,7 +10649,7 @@
return [
['both', 'Fwd: Re: Test subject both', 'Test subject both'=
],
['both', 'Re: Fwd: Test subject both', 'Test subject both'=
],
-@@ -1016,8 +1030,9 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
+@@ -1019,8 +1033,9 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
*=20
* @dataProvider data_remove_subject_prefix
*/
@@ -10660,7 +10660,7 @@
}
=20
/**
-@@ -1025,13 +1040,13 @@ class Framework_Utils extends PHPUnit\Framework\Te=
stCase
+@@ -1028,13 +1043,13 @@ class Framework_Utils extends PHPUnit\Framework\Te=
stCase
*/
function test_server_name()
{
@@ -10677,7 +10677,7 @@
}
=20
/**
-@@ -1041,31 +1056,31 @@ class Framework_Utils extends PHPUnit\Framework\Te=
stCase
+@@ -1044,31 +1059,31 @@ class Framework_Utils extends PHPUnit\Framework\Te=
stCase
{
$_SERVER['test'] =3D 'test.com';
=20
@@ -10876,7 +10876,7 @@
=20
$this->assertSame($result, "BEGIN:VCARD\r\nVERSION:3.0\r\nFN:\r\n=
N:;;;;\r\nEND:VCARD");
diff --git a/tests/Framework/Washtml.php b/tests/Framework/Washtml.php
-index 794a077..85cbe9b 100644
+index 13b3acc..de5b91f 100644
--- a/tests/Framework/Washtml.php
+++ b/tests/Framework/Washtml.php
@@ -1,11 +1,14 @@
@@ -11077,7 +11077,7 @@
{
$svg1 =3D "<svg id=3D'x' width=3D'100' height=3D'100'><a xlink:hr=
ef=3D'javascript:alert(1)'><rect x=3D'0' y=3D'0' width=3D'100' height=3D'10=
0' /></a></svg>";
=20
-@@ -622,9 +625,10 @@ class Framework_Washtml extends PHPUnit\Framework\Tes=
tCase
+@@ -626,9 +629,10 @@ class Framework_Washtml extends PHPUnit\Framework\Tes=
tCase
*
* @dataProvider data_wash_svg_tests
*/
@@ -11089,7 +11089,7 @@
$washed =3D $washer->wash($input);
=20
$this->assertSame($expected, $this->cleanupResult($washed), "SVG =
content");
-@@ -633,7 +637,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
+@@ -637,7 +641,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
/**
* Test cases for various XSS issues
*/
@@ -11098,7 +11098,7 @@
{
return [
[
-@@ -709,9 +713,10 @@ class Framework_Washtml extends PHPUnit\Framework\Tes=
tCase
+@@ -713,9 +717,10 @@ class Framework_Washtml extends PHPUnit\Framework\Tes=
tCase
*
* @dataProvider data_wash_xss_tests
*/
@@ -11110,7 +11110,7 @@
$washed =3D $washer->wash($input);
=20
$this->assertSame($expected, $this->cleanupResult($washed), "XSS =
issues");
-@@ -725,7 +730,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
+@@ -729,7 +734,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
$html =3D "<img style=3D'position:fixed' /><img style=3D\"positio=
n:/**/ fixed; top:10px\" />";
$exp =3D "<img style=3D\"position: absolute\" /><img style=3D\"p=
osition: absolute; top: 10px\" />";
=20
@@ -11119,7 +11119,7 @@
$washed =3D $washer->wash($html);
=20
$this->assertTrue(strpos($washed, $exp) !=3D=3D false, "Position:=
fixed (#5264)");
-@@ -769,7 +774,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
+@@ -773,7 +778,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
<annotation encoding=3D"TeX">I_D =3D \frac{1}{2} k_n \fra=
c{W}{L} (V_{GS}-V_t)^2</annotation>
</semantics></math>';
=20
@@ -11128,7 +11128,7 @@
$washed =3D $washer->wash($mathml);
=20
// remove whitespace between tags
-@@ -786,7 +791,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
+@@ -790,7 +795,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
{
$html =3D "<input type=3D\"image\" src=3D\"http://TRACKING_URL/\"=
>";
=20
@@ -11137,7 +11137,7 @@
$washed =3D $washer->wash($html);
=20
$this->assertTrue($washer->extlinks);
-@@ -794,7 +799,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
+@@ -798,7 +803,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
=20
$html =3D "<video src=3D\"http://TRACKING_URL/\">";
=20
@@ -11146,7 +11146,7 @@
$washed =3D $washer->wash($html);
=20
$this->assertTrue($washer->extlinks);
-@@ -822,14 +827,14 @@ class Framework_Washtml extends PHPUnit\Framework\Te=
stCase
+@@ -826,14 +831,14 @@ class Framework_Washtml extends PHPUnit\Framework\Te=
stCase
];
=20
foreach ($html as $item) {
@@ -11163,7 +11163,7 @@
$washed =3D $washer->wash($item[0]);
=20
$this->assertFalse($washer->extlinks);
-@@ -840,7 +845,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
+@@ -844,7 +849,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
{
$html =3D '<textarea><p style=3D"x:</textarea><img src=3Dx onerro=
r=3Dalert(1)>">';
=20
@@ -11172,7 +11172,7 @@
$washed =3D $washer->wash($html);
=20
$this->assertStringNotContainsString('onerror=3Dalert(1)>', $wash=
ed);
-@@ -852,7 +857,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
+@@ -856,7 +861,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
*/
function test_css_prefix()
{
@@ -11181,7 +11181,7 @@
=20
$html =3D '<p id=3D"my-id">'
. '<label for=3D"my-other-id" class=3D"my-class1 my-class2">t=
est</label>'
-@@ -880,14 +885,14 @@ class Framework_Washtml extends PHPUnit\Framework\Te=
stCase
+@@ -884,14 +889,14 @@ class Framework_Washtml extends PHPUnit\Framework\Te=
stCase
{
$html =3D '<p><?xml:namespace prefix =3D "xsl" /></p>';
=20
@@ -11198,7 +11198,7 @@
$washed =3D $this->cleanupResult($washer->wash($html));
=20
$this->assertSame($washed, 'HTML');
-@@ -898,7 +903,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
+@@ -902,7 +907,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
*/
function test_missing_tags()
{
@@ -11207,7 +11207,7 @@
=20
$html =3D '<head></head>First line<br />Second line';
$washed =3D $washer->wash($html);
-@@ -940,7 +945,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
+@@ -944,7 +949,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
{
$html =3D '<p><![CDATA[<script>alert(document.cookie)</script>]]>=
</p>';
=20
@@ -11216,7 +11216,7 @@
$washed =3D $washer->wash($html);
=20
$this->assertTrue(strpos($washed, '<script>') =3D=3D=3D false, "C=
DATA content");
-@@ -952,7 +957,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
+@@ -956,7 +961,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
function test_resolve_base()
{
$html =3D file_get_contents(TESTS_DIR . 'src/htmlbase.txt');
@@ -11225,7 +11225,7 @@
=20
$this->assertMatchesRegularExpression('|src=3D"http://alec\.pl/di=
r/img1\.gif"|', $html, "URI base resolving [1]");
$this->assertMatchesRegularExpression('|src=3D"http://alec\.pl/di=
r/img2\.gif"|', $html, "URI base resolving [2]");
-@@ -998,7 +1003,7 @@ class Framework_Washtml extends PHPUnit\Framework\Tes=
tCase
+@@ -1002,7 +1007,7 @@ class Framework_Washtml extends PHPUnit\Framework\Te=
stCase
<tr><td></td></tr>
</table>';
=20
diff -Nru roundcube-1.6.21+dfsg/debian/patches/Fix-IPv4-hex-nip.io-style-pa=
rsing-on-32-bits-platforms.patch roundcube-1.6.22+dfsg/debian/patches/Fix-I=
Pv4-hex-nip.io-style-parsing-on-32-bits-platforms.patch
--- roundcube-1.6.21+dfsg/debian/patches/Fix-IPv4-hex-nip.io-style-parsing-=
on-32-bits-platforms.patch 2026-11-15 19:45:19.000000000 +0100
+++ roundcube-1.6.22+dfsg/debian/patches/Fix-IPv4-hex-nip.io-style-parsing-=
on-32-bits-platforms.patch 2026-11-24 15:14:03.000000000 +0100
@@ -14,7 +14,7 @@
1 file changed, 8 insertions(+), 1 deletion(-)
=20
diff --git a/program/lib/Roundcube/rcube_utils.php b/program/lib/Roundcube=
/rcube_utils.php
-index d5aa80d..27329a5 100644
+index 15c7b61..2508be8 100644
--- a/program/lib/Roundcube/rcube_utils.php
+++ b/program/lib/Roundcube/rcube_utils.php
@@ -631,7 +631,14 @@ class rcube_utils
diff -Nru roundcube-1.6.21+dfsg/debian/patches/Tests-Use-mocked-Guzzle-clie=
nt-in-Modcss-action-test.patch roundcube-1.6.22+dfsg/debian/patches/Tests-U=
se-mocked-Guzzle-client-in-Modcss-action-test.patch
--- roundcube-1.6.21+dfsg/debian/patches/Tests-Use-mocked-Guzzle-client-in-=
Modcss-action-test.patch 2026-11-15 19:45:19.000000000 +0100
+++ roundcube-1.6.22+dfsg/debian/patches/Tests-Use-mocked-Guzzle-client-in-=
Modcss-action-test.patch 2026-11-24 15:14:03.000000000 +0100
@@ -10,7 +10,7 @@
2 files changed, 27 insertions(+)
=20
diff --git a/tests/Actions/Utils/Modcss.php b/tests/Actions/Utils/Modcss.p=
hp
-index 232e912..1081886 100644
+index 012f21a..7123f44 100644
--- a/tests/Actions/Utils/Modcss.php
+++ b/tests/Actions/Utils/Modcss.php
@@ -47,6 +47,11 @@ class Actions_Utils_Modcss extends ActionTestCase
diff -Nru roundcube-1.6.21+dfsg/plugins/managesieve/lib/Roundcube/rcube_sie=
ve_script.php roundcube-1.6.22+dfsg/plugins/managesieve/lib/Roundcube/rcube=
_sieve_script.php
--- roundcube-1.6.21+dfsg/plugins/managesieve/lib/Roundcube/rcube_sieve_scr=
ipt.php 2026-11-09 12:53:01.000000000 +0100
+++ roundcube-1.6.22+dfsg/plugins/managesieve/lib/Roundcube/rcube_sieve_scr=
ipt.php 2026-11-23 12:17:59.000000000 +0100
@@ -313,7 +313,7 @@
}
=20
// :all address-part is optional, skip it
- if (!empty($test['part']) && $test['part'] !=3D 'a=
ll') {
+ if (preg_match('/^(localpart|domain|user|detail)$/=
i', $test['part'] ?? '')) {
$tests[$i] .=3D ' :' . $test['part'];
if ($test['part'] =3D=3D 'user' || $test['part=
'] =3D=3D 'detail') {
array_push($exts, 'subaddress');
@@ -331,7 +331,7 @@
=20
$tests[$i] .=3D (!empty($test['not']) ? 'not ' : '=
') . 'body';
=20
- if (!empty($test['part'])) {
+ if (preg_match('/^(raw|content|text)$/i', $test['p=
art'] ?? '')) {
$tests[$i] .=3D ' :' . $test['part'];
=20
if (!empty($test['content']) && $test['part'] =
=3D=3D 'content') {
@@ -1081,8 +1081,11 @@
array_push($exts, 'relational');
array_push($exts, 'comparator-i;ascii-numeric');
}
- else if (!in_array($test['comparator'], ['i;octet', 'i;ascii-casem=
ap'])) {
+ else if (preg_match('/^[a-z.;-]+\z/i', $test['comparator'])
+ && !in_array($test['comparator'], ['i;octet', 'i;ascii-casemap=
'])
+ ) {
array_push($exts, 'comparator-' . $test['comparator']);
+ $exts[] =3D 'comparator-' . $test['comparator'];
}
=20
// skip default comparator
diff -Nru roundcube-1.6.21+dfsg/plugins/password/drivers/ximss.php roundcub=
e-1.6.22+dfsg/plugins/password/drivers/ximss.php
--- roundcube-1.6.21+dfsg/plugins/password/drivers/ximss.php 2026-11-09 12:=
53:01.000000000 +0100
+++ roundcube-1.6.22+dfsg/plugins/password/drivers/ximss.php 2026-11-23 12:=
17:59.000000000 +0100
@@ -45,9 +45,9 @@
}
=20
// send all requests at once(pipelined)
- fwrite($sock, '<login id=3D"A001" authData=3D"'.$username.'" passw=
ord=3D"'.$pass.'" />'."\0");
- fwrite($sock, '<passwordModify id=3D"A002" oldPassword=3D"'.$pass.=
'" newPassword=3D"'.$newpass.'" />'."\0");
- fwrite($sock, '<bye id=3D"A003" />'."\0");
+ fwrite($sock, self::xml_tag('login', ['id' =3D> 'A001', 'authData'=
=3D> $username, 'password' =3D> $pass]) . "\0");
+ fwrite($sock, self::xml_tag('passwordModify', ['id' =3D> 'A002', '=
oldPassword' =3D> $pass, 'newPassword' =3D> $newpass]) . "\0");
+ fwrite($sock, self::xml_tag('bye', ['id' =3D> 'A003']) . "\0");
=20
//example responses
// <session id=3D"A001" urlID=3D"4815-vN2Txjkggy7gjHRD10jw" userName=3D=
"user@example.com"/>\0
@@ -87,4 +87,21 @@
=20
return PASSWORD_SUCCESS;
}
+
+ /**
+ * Create output for an XML element
+ */
+ private static function xml_tag($tag, $attributes =3D [])
+ {
+ $doc =3D new \DOMDocument('1.0', RCUBE_CHARSET);
+
+ $fragment =3D $doc->createDocumentFragment();
+ $fragment->appendChild($elem =3D $doc->createElement($tag));
+
+ foreach ($attributes as $name =3D> $value) {
+ $elem->setAttribute($name, $value);
+ }
+
+ return $doc->saveXML($fragment);
+ }
}
diff -Nru roundcube-1.6.21+dfsg/program/actions/mail/index.php roundcube-1.=
6.22+dfsg/program/actions/mail/index.php
--- roundcube-1.6.21+dfsg/program/actions/mail/index.php 2026-11-09 12:53:0=
1.000000000 +0100
+++ roundcube-1.6.22+dfsg/program/actions/mail/index.php 2026-11-23 12:17:5=
9.000000000 +0100
@@ -1275,8 +1275,10 @@
$attrib['href'] =3D preg_replace('/[\x00-\x1F]/', '', $attrib[=
'href']);
=20
if ($tag =3D=3D 'link' && preg_match('/^https?:\/\//i', $attri=
b['href']) && !rcube_utils::is_local_url($attrib['href'])) {
- $tempurl =3D 'tmp-' . md5($attrib['href']) . '.css';
- $_SESSION['modcssurls'][$tempurl] =3D $attrib['href'];
+ if (!($tempurl =3D array_search($attrib['href'], $_SESSION=
['modcssurls'] ?? [], true))) {
+ $tempurl =3D rcube_utils::random_bytes(16);
+ $_SESSION['modcssurls'][$tempurl] =3D $attrib['href'];
+ }
$attrib['href'] =3D $rcmail->url([
'task' =3D> 'utils',
'action' =3D> 'modcss',
diff -Nru roundcube-1.6.21+dfsg/program/actions/utils/modcss.php roundcube-=
1.6.22+dfsg/program/actions/utils/modcss.php
--- roundcube-1.6.21+dfsg/program/actions/utils/modcss.php 2026-11-09 12:53=
:01.000000000 +0100
+++ roundcube-1.6.22+dfsg/program/actions/utils/modcss.php 2026-11-23 12:17=
:59.000000000 +0100
@@ -82,7 +82,10 @@
if ($source !=3D=3D false && self::is_valid_css($source, $ctype)) {
$rcmail->output->sendExit(
rcube_utils::mod_css_styles($source, $container_id, false,=
$css_prefix),
- ['Content-Type: text/css']
+ [
+ 'Content-Type: text/css',
+ 'X-Content-Type-Options: nosniff',
+ ]
);
}
=20
@@ -98,7 +101,8 @@
// on what we proxy to the browser. Here we check if we deal with =
css or not.
=20
return preg_match('~^text/(css|plain)~i', (string) $ctype)
- && !preg_match('~^[{<]~', $source) // exclude json and html
+ // exclude json and html/xml (ignore leading whitespace and BO=
M)
+ && !preg_match('~^[{<]~', ltrim($source, " \f\n\r\t\v\x00\xFE\=
xFF\xEF\xBB\xBF"))
&& strpos($source, '{')
&& strpos($source, '}')
&& strpos($source, ':');
diff -Nru roundcube-1.6.21+dfsg/program/lib/Roundcube/rcube_image.php round=
cube-1.6.22+dfsg/program/lib/Roundcube/rcube_image.php
--- roundcube-1.6.21+dfsg/program/lib/Roundcube/rcube_image.php 2026-11-09 =
12:53:01.000000000 +0100
+++ roundcube-1.6.22+dfsg/program/lib/Roundcube/rcube_image.php 2026-11-23 =
12:17:59.000000000 +0100
@@ -149,9 +149,9 @@
}
else {
// Note: We don't support types like svg or eps for securi=
ty reasons
- $valid_types =3D 'bmp,gif,jp2,jpg,png,tif';
+ $valid_types =3D explode(',', 'bmp,gif,heic,jp2,jpg,png,ti=
f');
=20
- if (in_array($type, explode(',', $valid_types))) { // Vali=
d type?
+ if (in_array($type, $valid_types) && in_array($p['intype']=
, $valid_types)) {
if ($scale >=3D 1) {
$width =3D $props['width'];
$height =3D $props['height'];
diff -Nru roundcube-1.6.21+dfsg/program/lib/Roundcube/rcube_imap_generic.ph=
p roundcube-1.6.22+dfsg/program/lib/Roundcube/rcube_imap_generic.php
--- roundcube-1.6.21+dfsg/program/lib/Roundcube/rcube_imap_generic.php 2026=
-11-09 12:53:01.000000000 +0100
+++ roundcube-1.6.22+dfsg/program/lib/Roundcube/rcube_imap_generic.php 2026=
-11-23 12:17:59.000000000 +0100
@@ -1105,7 +1105,13 @@
}
=20
// TLS connection
- if ($ssl_mode =3D=3D 'tls' && $this->getCapability('STARTTLS')) {
+ if ($ssl_mode =3D=3D 'tls') {
+ if (!$this->getCapability('STARTTLS')) {
+ $this->setError(self::ERROR_BAD, 'STARTTLS is not supporte=
d by the server');
+ $this->closeConnection();
+ return false;
+ }
+
$res =3D $this->execute('STARTTLS');
=20
if (empty($res) || $res[0] !=3D self::ERROR_OK) {
diff -Nru roundcube-1.6.21+dfsg/program/lib/Roundcube/rcube_smtp.php roundc=
ube-1.6.22+dfsg/program/lib/Roundcube/rcube_smtp.php
--- roundcube-1.6.21+dfsg/program/lib/Roundcube/rcube_smtp.php 2026-11-09 1=
2:53:01.000000000 +0100
+++ roundcube-1.6.22+dfsg/program/lib/Roundcube/rcube_smtp.php 2026-11-23 1=
2:17:59.000000000 +0100
@@ -163,8 +163,12 @@
if ($use_tls) {
$result =3D $this->conn->starttls();
=20
- if (is_a($result, 'PEAR_Error')) {
- $this->_conn_error('smtpconnerror', "STARTTLS failed", [],=
$result);
+ if ($result !=3D=3D true) {
+ if (!$result instanceof \PEAR_Error) {
+ $result =3D new \Exception('STARTTLS is not available'=
, 454);
+ }
+
+ $this->_conn_error('smtpconnerror', 'STARTTLS failed', [],=
$result);
$this->disconnect();
return false;
}
diff -Nru roundcube-1.6.21+dfsg/program/lib/Roundcube/rcube_spellchecker.ph=
p roundcube-1.6.22+dfsg/program/lib/Roundcube/rcube_spellchecker.php
--- roundcube-1.6.21+dfsg/program/lib/Roundcube/rcube_spellchecker.php 2026=
-11-09 12:53:01.000000000 +0100
+++ roundcube-1.6.22+dfsg/program/lib/Roundcube/rcube_spellchecker.php 2026=
-11-23 12:17:59.000000000 +0100
@@ -46,6 +46,12 @@
*/
function __construct($lang =3D 'en')
{
+ // Sanity check the language code, so spellcheck drivers don't hav=
e to
+ // and can pass it to the backend safely
+ if ($lang && !rcube_utils::is_simple_string($lang)) {
+ $lang =3D 'en';
+ }
+
$this->rc =3D rcube::get_instance();
$this->engine =3D $this->rc->config->get('spellcheck_engine', 'goo=
gie');
$this->lang =3D $lang ?: 'en';
diff -Nru roundcube-1.6.21+dfsg/program/lib/Roundcube/rcube_tnef_decoder.ph=
p roundcube-1.6.22+dfsg/program/lib/Roundcube/rcube_tnef_decoder.php
--- roundcube-1.6.21+dfsg/program/lib/Roundcube/rcube_tnef_decoder.php 2026=
-11-09 12:53:01.000000000 +0100
+++ roundcube-1.6.22+dfsg/program/lib/Roundcube/rcube_tnef_decoder.php 2026=
-11-23 12:17:59.000000000 +0100
@@ -331,6 +331,9 @@
case self::MAPI_BOOLEAN:
for ($i =3D 0; $i < $num_mval; $i++) {
$value =3D $this->_geti($data, 32);
+ if ($value =3D=3D=3D null) {
+ break;
+ }
}
break;
=20
diff -Nru roundcube-1.6.21+dfsg/program/lib/Roundcube/rcube_utils.php round=
cube-1.6.22+dfsg/program/lib/Roundcube/rcube_utils.php
--- roundcube-1.6.21+dfsg/program/lib/Roundcube/rcube_utils.php 2026-11-09 =
12:53:01.000000000 +0100
+++ roundcube-1.6.22+dfsg/program/lib/Roundcube/rcube_utils.php 2026-11-23 =
12:17:59.000000000 +0100
@@ -611,7 +611,7 @@
// If after removing comments there are still comments it's most l=
ikely a hack
// Note: In <=3D1.6 comments are being removed by xss_entity_decod=
e() above
// $source =3D self::remove_css_comments($source);
- if (strpos($source, '/*') !=3D=3D false || strpos($source, '<!--')=
!=3D=3D false) {
+ if (strpos($source, '/*') !=3D=3D false || strpos($source, '<!--')=
!=3D=3D false || strpos($source, '-->') !=3D=3D false) {
return '/* evil! */';
}
=20
diff -Nru roundcube-1.6.21+dfsg/program/lib/Roundcube/rcube_washtml.php rou=
ndcube-1.6.22+dfsg/program/lib/Roundcube/rcube_washtml.php
--- roundcube-1.6.21+dfsg/program/lib/Roundcube/rcube_washtml.php 2026-11-0=
9 12:53:01.000000000 +0100
+++ roundcube-1.6.22+dfsg/program/lib/Roundcube/rcube_washtml.php 2026-11-2=
3 12:17:59.000000000 +0100
@@ -357,8 +357,16 @@
) {
$out =3D preg_replace('/(\S+)/', $this->_css_prefix . =
'\1', $value);
}
+ else if ($key =3D=3D 'xmlns' && !strpos($value, '://')) {
+ continue;
+ }
else if ($key) {
- $out =3D $value;
+ // Namespace-prefixed attribute bypass prevention for =
DOMDocument and libxml2 < 2.14
+ if (preg_match('/[^a-z:-]/i', $attr->nodeName)) {
+ continue;
+ }
+
+ $out =3D $value;
}
=20
if ($out !=3D=3D null && $out !=3D=3D '') {
@@ -606,8 +614,11 @@
*/
public static function css_unescape($value)
{
- if (strpos((string) $value, '\\') =3D=3D=3D false) {
- return (string) $value;
+ // Remove comments
+ $value =3D preg_replace('#/\*.*\*/#Ums', '', (string) $value);
+
+ if (strpos($value, '\\') =3D=3D=3D false) {
+ return $value;
}
=20
return preg_replace_callback(
@@ -625,7 +636,7 @@
=20
return $m[2];
},
- (string) $value
+ $value
);
}
=20
diff -Nru roundcube-1.6.21+dfsg/public_html/plugins/managesieve/lib/Roundcu=
be/rcube_sieve_script.php roundcube-1.6.22+dfsg/public_html/plugins/manages=
ieve/lib/Roundcube/rcube_sieve_script.php
--- roundcube-1.6.21+dfsg/public_html/plugins/managesieve/lib/Roundcube/rcu=
be_sieve_script.php 2026-11-09 12:53:01.000000000 +0100
+++ roundcube-1.6.22+dfsg/public_html/plugins/managesieve/lib/Roundcube/rcu=
be_sieve_script.php 2026-11-23 12:17:59.000000000 +0100
@@ -313,7 +313,7 @@
}
=20
// :all address-part is optional, skip it
- if (!empty($test['part']) && $test['part'] !=3D 'a=
ll') {
+ if (preg_match('/^(localpart|domain|user|detail)$/=
i', $test['part'] ?? '')) {
$tests[$i] .=3D ' :' . $test['part'];
if ($test['part'] =3D=3D 'user' || $test['part=
'] =3D=3D 'detail') {
array_push($exts, 'subaddress');
@@ -331,7 +331,7 @@
=20
$tests[$i] .=3D (!empty($test['not']) ? 'not ' : '=
') . 'body';
=20
- if (!empty($test['part'])) {
+ if (preg_match('/^(raw|content|text)$/i', $test['p=
art'] ?? '')) {
$tests[$i] .=3D ' :' . $test['part'];
=20
if (!empty($test['content']) && $test['part'] =
=3D=3D 'content') {
@@ -1081,8 +1081,11 @@
array_push($exts, 'relational');
array_push($exts, 'comparator-i;ascii-numeric');
}
- else if (!in_array($test['comparator'], ['i;octet', 'i;ascii-casem=
ap'])) {
+ else if (preg_match('/^[a-z.;-]+\z/i', $test['comparator'])
+ && !in_array($test['comparator'], ['i;octet', 'i;ascii-casemap=
'])
+ ) {
array_push($exts, 'comparator-' . $test['comparator']);
+ $exts[] =3D 'comparator-' . $test['comparator'];
}
=20
// skip default comparator
diff -Nru roundcube-1.6.21+dfsg/public_html/plugins/password/drivers/ximss.=
php roundcube-1.6.22+dfsg/public_html/plugins/password/drivers/ximss.php
--- roundcube-1.6.21+dfsg/public_html/plugins/password/drivers/ximss.php 20=
26-11-09 12:53:01.000000000 +0100
+++ roundcube-1.6.22+dfsg/public_html/plugins/password/drivers/ximss.php 20=
26-11-23 12:17:59.000000000 +0100
@@ -45,9 +45,9 @@
}
=20
// send all requests at once(pipelined)
- fwrite($sock, '<login id=3D"A001" authData=3D"'.$username.'" passw=
ord=3D"'.$pass.'" />'."\0");
- fwrite($sock, '<passwordModify id=3D"A002" oldPassword=3D"'.$pass.=
'" newPassword=3D"'.$newpass.'" />'."\0");
- fwrite($sock, '<bye id=3D"A003" />'."\0");
+ fwrite($sock, self::xml_tag('login', ['id' =3D> 'A001', 'authData'=
=3D> $username, 'password' =3D> $pass]) . "\0");
+ fwrite($sock, self::xml_tag('passwordModify', ['id' =3D> 'A002', '=
oldPassword' =3D> $pass, 'newPassword' =3D> $newpass]) . "\0");
+ fwrite($sock, self::xml_tag('bye', ['id' =3D> 'A003']) . "\0");
=20
//example responses
// <session id=3D"A001" urlID=3D"4815-vN2Txjkggy7gjHRD10jw" userName=3D=
"user@example.com"/>\0
@@ -87,4 +87,21 @@
=20
return PASSWORD_SUCCESS;
}
+
+ /**
+ * Create output for an XML element
+ */
+ private static function xml_tag($tag, $attributes =3D [])
+ {
+ $doc =3D new \DOMDocument('1.0', RCUBE_CHARSET);
+
+ $fragment =3D $doc->createDocumentFragment();
+ $fragment->appendChild($elem =3D $doc->createElement($tag));
+
+ foreach ($attributes as $name =3D> $value) {
+ $elem->setAttribute($name, $value);
+ }
+
+ return $doc->saveXML($fragment);
+ }
}
diff -Nru roundcube-1.6.21+dfsg/tests/Actions/Mail/Index.php roundcube-1.6.=
22+dfsg/tests/Actions/Mail/Index.php
--- roundcube-1.6.21+dfsg/tests/Actions/Mail/Index.php 2026-11-09 12:53:01.=
000000000 +0100
+++ roundcube-1.6.22+dfsg/tests/Actions/Mail/Index.php 2026-11-23 12:17:59.=
000000000 +0100
@@ -349,7 +349,7 @@
$this->assertMatchesRegularExpression('/<style [^>]+>/', $html, "A=
llow styles in safe mode");
$this->assertMatchesRegularExpression('#src=3D"http://evilsite.net=
/mailings/ex3.jpg"#', $html, "Allow external images in HTML (safe mode)");
$this->assertMatchesRegularExpression("#url\('?http://evilsite.net=
/newsletter/image/bg/bg-64.jpg'?\)#", $html, "Allow external images in CSS =
(safe mode)");
- $css =3D '<link rel=3D"stylesheet" .+_action=3Dmodcss.+_u=3Dtmp-[a=
-z0-9]+\.css';
+ $css =3D '<link rel=3D"stylesheet" .+_action=3Dmodcss.+_u=3D[a-z0-=
9]{16}';
$this->assertMatchesRegularExpression('#'.$css.'#Ui', $html, "Filt=
er (anonymized) external stylesheets with utils/modcss.php");
}
=20
@@ -404,6 +404,30 @@
}
=20
/**
+ * Test the elimination of some XSS vulnerabilities
+ */
+ public function test_html_xss4()
+ {
+ // Note: The issue reproducible using PHP < 8.4 and libxml2 <=3D 2=
=2E13
+
+ $this->initOutput(\rcmail_action::MODE_HTTP, 'mail', '');
+
+ $html =3D '<html><body>'
+ . '<a xmlns:=C3=A9=3D"urn:x" =C3=A9:alt=3D"A onclick=3Dalert(d=
ocument.domain) B" href=3D"http://e.example/">link</a>'
+ . '</body></html>';
+ $washed =3D \rcmail_action_mail_index::wash_html($html, ['safe' =
=3D> true], []);
+
+ $this->assertStringContainsString('<a href=3D"http://e.example/" t=
arget=3D"_blank" rel=3D"noreferrer">', $washed);
+
+ $html =3D '<body xmlns:=C3=A9=3D"u" =C3=A9:alt=3D"A onanimationsta=
rt=3Dalert(document.domain) B" style=3D"animation:spinner-grow 0.05s">'
+ . '<svg xmlns=3D"http://www.w3.org/2000/svg"><text>X</text></s=
vg></body>';
+ $washed =3D \rcmail_action_mail_index::wash_html($html, ['safe' =
=3D> true], []);
+
+ $this->assertStringNotContainsString('onanimationstart', $washed);
+ $this->assertStringNotContainsString('alert', $washed);
+ }
+
+ /**
* Test that HTML sanitization does not change attribute (evil) values
*/
public function test_html_body_attributes()
diff -Nru roundcube-1.6.21+dfsg/tests/Actions/Utils/Modcss.php roundcube-1.=
6.22+dfsg/tests/Actions/Utils/Modcss.php
--- roundcube-1.6.21+dfsg/tests/Actions/Utils/Modcss.php 2026-11-09 12:53:0=
1.000000000 +0100
+++ roundcube-1.6.22+dfsg/tests/Actions/Utils/Modcss.php 2026-11-23 12:17:5=
9.000000000 +0100
@@ -61,8 +61,9 @@
=20
$this->runAndAssert($action, OutputHtmlMock::E_EXIT);
=20
- $this->assertSame(null, $output->getProperty('errorCode'));
- $this->assertSame(['Content-Type: text/css'], $output->getProperty=
('headers'));
+ $this->assertNull($output->getProperty('errorCode'));
+ $this->assertContains('Content-Type: text/css', $output->getProper=
ty('headers'));
+ $this->assertContains('X-Content-Type-Options: nosniff', $output->=
getProperty('headers'));
$this->assertStringContainsString('#cid div.prefixpre', $output->g=
etOutput());
}
}
diff -Nru roundcube-1.6.21+dfsg/tests/Framework/TnefDecoder.php roundcube-1=
=2E6.22+dfsg/tests/Framework/TnefDecoder.php
--- roundcube-1.6.21+dfsg/tests/Framework/TnefDecoder.php 2026-11-09 12:53:=
01.000000000 +0100
+++ roundcube-1.6.22+dfsg/tests/Framework/TnefDecoder.php 2026-11-23 12:17:=
59.000000000 +0100
@@ -130,6 +130,25 @@
}
=20
/**
+ * Test decoding with uncapped MAPI bool/int attribute value
+ */
+ public function test_decompress_uncapped_bool_or_int()
+ {
+ $tnef =3D new \rcube_tnef_decoder();
+ $result =3D [];
+
+ // VULNERABLE: MAPI_INT with MAPI_MV_FLAG set, num_mval=3D20M, buf=
fer depleted
+ $payload =3D pack('V', 1)
+ . pack('v', 0x1003)
+ . pack('v', 0x0037)
+ . pack('V', 20000000);
+
+ $t =3D microtime(true);
+ invokeMethod($tnef, '_extractMapiAttributes', [$payload, &$result]=
);
+ $this->assertTrue(microtime(true) - $t < 1);
+ }
+
+ /**
* Test rtf2text()
*/
function test_rtf2text()
diff -Nru roundcube-1.6.21+dfsg/tests/Framework/Utils.php roundcube-1.6.22+=
dfsg/tests/Framework/Utils.php
--- roundcube-1.6.21+dfsg/tests/Framework/Utils.php 2026-11-09 12:53:01.000=
000000 +0100
+++ roundcube-1.6.22+dfsg/tests/Framework/Utils.php 2026-11-23 12:17:59.000=
000000 +0100
@@ -322,6 +322,9 @@
$mod =3D \rcube_utils::mod_css_styles('//* test */* {background-co=
lor: silver;}', 'rcmbody', true);
$this->assertSame('/* evil! */', $mod);
=20
+ $mod =3D \rcube_utils::mod_css_styles('-->* { color:red; }-->p { c=
olor: blue; }', 'rcmbody', true);
+ $this->assertSame('/* evil! */', $mod);
+
// CSS at-rules
$style =3D '@layer a; div { display: none; }';
$mod =3D \rcube_utils::mod_css_styles($style, 'rcmbody', true);
diff -Nru roundcube-1.6.21+dfsg/tests/Framework/Washtml.php roundcube-1.6.2=
2+dfsg/tests/Framework/Washtml.php
--- roundcube-1.6.21+dfsg/tests/Framework/Washtml.php 2026-11-09 12:53:01.0=
00000000 +0100
+++ roundcube-1.6.22+dfsg/tests/Framework/Washtml.php 2026-11-23 12:17:59.0=
00000000 +0100
@@ -516,6 +516,10 @@
'<svg><rect x-washed=3D"fill" /></svg>',
],
[
+ '<svg><rect fill=3D"/**/url(http://attacker.com)"/></svg>',
+ '<svg><rect x-washed=3D"fill" /></svg>',
+ ],
+ [
'<svg><animate attributeName=3D"mask" values=3D"url(https:=
//external.site)" fill=3D"freeze" dur=3D"0.1s" /></svg>',
'<svg><!-- animate blocked --></svg>',
],
--MycHVAauu3zZK0TQ--
--uwq1sS2Q7Qe7BNAm
Content-Type: application/pgp-signature; name=signature.asc
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEERpy6p3b9sfzUdbME05pJnDwhpVIFAmsFpdkACgkQ05pJnDwh
pVJs7Q//c6eUENKdGixnVtl2diaS5zYdP+kOrcCXHzo5OCkPEU+qwSckGsgaW5Ul
kkUYpMcTl8/uCfR1WfU/bfpbf606LGtFbL7ayp6WuyoTOVC52/WYesaz9OjJOGZU
9663H06tpO/ZppmJSGw0q2tJ1bZt67CzN3KA4jNcGt06WJVgoG+8LdOYLTbd+wme
LeQpa0+yROaEXu/No4gETs1lxGnekw+bmXFgeE6S3+Z0mYtry8LUlqgef5lzdgR9
iMKi1rjEm7XBNfweH8hLKnH2RGHBCdfPk8dwxK7Dkj1vCiMyJ2Ry55hlOrEBEVD4
a/TtrWRRJ5Jx9crWQKHWrQviwrnURYAYas7X4QLAwa2dgSN/lovqQUqBFGRiEfLh
hfXfUGHt2xtlvBOlOtrwBlpQHEQEY0Z1++ynLsauLQFW3jiLlWC4WsK0N3HdCFJ7
IUN8G0pqxZEbYxgZB+yWzceVY+TVuXrF8fhgmf4UGX4AaI4pk0A4rQgjdnS0/Oi2
kH8uTNm9vZlmWPXRhFrOLq6jUUzokAYoYU11X4p7l0hHsFUTx/2seT2DSSrJxZ4U
Wf2VBrCJyiAGJcLa5h+znpMUVgozyIgyImUqAvsCmrUL3pv1jn/wsohT7ejaolPu
nYPaOBP3enzh3bi+eD/RrvLapWSV3iQ473cH5sCEXDYbNUc0CB4=
=Q8r9
-----END PGP SIGNATURE-----
--uwq1sS2Q7Qe7BNAm--
Technical Details
Message-ID:
<O309X-dToj-9@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!news-fra.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomodReferences:
<O2E9r-dGYI-3@gated-at.bofh.it> <O2E9r-dGYI-3@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-fra.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod From: Guilhem Moulin <guilhem@debian.org> Newsgroups: linux.debian.bugs.dist Subject: Bug#1155011: roundcube: Multiple security vulnerabilities Date: Tue, 24 Nov 2026 16:00:01 +0100 Message-ID: <O309X-dToj-9@gated-at.bofh.it> References: <O2E9r-dGYI-3@gated-at.bofh.it> <O2E9r-dGYI-3@gated-at.bofh.it> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Tue Nov 24 14:59:11 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: 4.642 Reply-To: Guilhem Moulin <guilhem@debian.org>, 1155011@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: pkg-roundcube-maintainers@alioth-lists.debian.net X-Debian-Pr-Message: followup 1155011 X-Debian-Pr-Package: src:roundcube X-Debian-Pr-Keywords: security upstream X-Debian-Pr-Source: roundcube MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="uwq1sS2Q7Qe7BNAm" Content-Disposition: inline X-Debian-User: guilhem X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2004694 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 1503 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: 1155011@bugs.debian.org X-Original-Date: Tue, 24 Nov 2026 15:57:34 +0100 X-Original-Message-ID: <awWl2Vtfk4N9qC6h@debian.org> X-Original-References: <awRZsmD-F5JpI32H@debian.org> <awRZsmD-F5JpI32H@debian.org>