Article View: linux.debian.bugs.dist
Article #1542Bug#1151279: roundcube: Multiple security vulnerabilities
From: Guilhem Moulin
Date: Wed, 21 Oct 2026 04:00
Date: Wed, 21 Oct 2026 04:00
2132 lines
84310 bytes
84310 bytes
--lG/i1JgFdfSaYiDE
Content-Type: multipart/mixed; boundary="TfsI180ySPTrCE+u"
Content-Disposition: inline
--TfsI180ySPTrCE+u
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Wed, 21 Oct 2026 at 05:49:58 +0200, Guilhem Moulin wrote:
> On Mon, 19 Oct 2026 at 16:22:07 +0200, Guilhem Moulin wrote:
>> Roundcube webmail upstream has just released 1.6.20 [0] which fixes a
>> new batch of security vulnerabilities:
>
> As for the previous uploads, I suggest to follow 1.6.x (upstream's
> current LTS release) for trixie-security. The upstream diff [0] is
> targeted anyway. Several of the issues, in particular the SSRF, XSS and
> remote-content blocker bypass, have test coverage.
>
> Tested debdiff attached. Debusine result:
> https://debusine.debian.net/debian/developers/work-request/1508582/
Oops, now with the right recipient and the attachment.
--=20
Guilhem.
--TfsI180ySPTrCE+u
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment; filename=roundcube.debdiff
Content-Transfer-Encoding: quoted-printable
diffstat for roundcube-1.6.19+dfsg roundcube-1.6.20+dfsg
CHANGELOG.md | 23=
+
debian/changelog | 38=
++
debian/patches/Avoid-dependency-on-new-package-mlocati-ip-lib.patch | 22=
-
debian/patches/Fix-FTBFS-with-phpunit-11.patch | 148=
+++++-----
index.php | 10=
=20
plugins/markasjunk/markasjunk.php | 2=
=20
plugins/password/drivers/directadmin.php | 2=
=20
plugins/password/drivers/modoboa.php | 29=
+
plugins/password/password.php | 2=
=20
plugins/squirrelmail_usercopy/squirrelmail_usercopy.php | 5=
=20
program/actions/contacts/upload_photo.php | 2=
=20
program/actions/mail/compose.php | 6=
=20
program/actions/mail/headers.php | 3=
=20
program/actions/mail/viewsource.php | 3=
=20
program/actions/utils/modcss.php | 23=
+
program/include/rcmail.php | 25=
+
program/include/rcmail_attachment_handler.php | 3=
=20
program/include/rcmail_sendmail.php | 14=
=20
program/lib/Roundcube/rcube_image.php | 5=
=20
program/lib/Roundcube/rcube_imap_generic.php | 4=
=20
program/lib/Roundcube/rcube_mime.php | 3=
=20
program/lib/Roundcube/rcube_session.php | 9=
=20
program/lib/Roundcube/rcube_user.php | 4=
=20
program/lib/Roundcube/rcube_utils.php | 10=
=20
program/lib/Roundcube/rcube_washtml.php | 73=
++++
public_html/plugins/markasjunk/markasjunk.php | 2=
=20
public_html/plugins/password/drivers/directadmin.php | 2=
=20
public_html/plugins/password/drivers/modoboa.php | 29=
+
public_html/plugins/password/password.php | 2=
=20
public_html/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php | 5=
=20
tests/Framework/Mime.php | 15=
+
tests/Framework/Utils.php | 22=
+
tests/Framework/Washtml.php | 49=
+++
tests/Rcmail/Sendmail.php | 20=
+
tests/src/logo.jpg |binary
35 files changed, 462 insertions(+), 152 deletions(-)
diff -Nru roundcube-1.6.19+dfsg/CHANGELOG.md roundcube-1.6.20+dfsg/CHANGELO=
G.md
--- roundcube-1.6.19+dfsg/CHANGELOG.md 2026-09-06 10:27:09.000000000 +0200
+++ roundcube-1.6.20+dfsg/CHANGELOG.md 2026-10-19 08:49:43.000000000 +0200
@@ -2,6 +2,29 @@
=20
## Unreleased
=20
+- Security: Fix IMAP command injection via CRLF in `_uid` parameter of mai=
l/headers and mail/viewsource action
+- Security: Fix bug where an alias login wasn't qualified by IMAP host
+- Security: Add a size limit to the CSS proxy content processing
+- Security: Fix SSRF filter (is_local_url()) bypass via NAT64 64:ff9b::/96
+- Security: Fix remote content blocking bypass via SVG SMIL `by` attribute
+- Security: Fix remote content blocking bypass via CSS escapes in FuncIRI =
attributes (again)
+- Security: Fix passing potentally unsafe attachment content into ImageMag=
ick on image resize
+- Security: Fix mail header injection via the From display-name in the Bou=
nce (resend) action
+- Security: Fix mail header injection via References/In-Reply-To/Message-I=
D/From parameters
+- Security: Fix object injection primitive in rcube_session::unserialize()=
via "!"-prefixed session keys
+- Security: Fix ImageMagick resource limits bypass by GD fallback during t=
humbnail generation
+- Security: Fix CSS scoping bypass in HTML messages using at-rules
+- Security: Fix bug where deprecated action aliases bypassed `disabled_act=
ions` setting
+- Security: Fix IMAP command injection via CRLF in `_flag` parameter of ma=
il/mark action
+- Security: Fix CSRF validation bypass in the mark-as-junk action
+- Security: Fix XSS issue in handling of password driver error responses
+- Security: Fix mail header injection via subject of a message forwarded a=
s attachment
+- Security: Fix mail header injection via media type in an inline image da=
ta URI
+- Security: Fix bug where Password Modoboa driver could change password fo=
r another account
+- Security: Fix unsafe use of a login name in SquirrelMail import file path
+
+## Release 1.6.19
+
- Fix PHP Warning: Undefined variable $tmp_command in .../plugins/markasju=
nk/drivers/cmd_learn.php (#10294)
- Security: Fix CSS declaration smuggling via un-encoded ampersand emission
- Security: Fix CSS property injection via body `background` attribute
diff -Nru roundcube-1.6.19+dfsg/debian/changelog roundcube-1.6.20+dfsg/debi=
an/changelog
--- roundcube-1.6.19+dfsg/debian/changelog 2026-09-06 13:22:41.000000000 +0=
200
+++ roundcube-1.6.20+dfsg/debian/changelog 2026-10-20 07:00:29.000000000 +0=
200
@@ -1,3 +1,41 @@
+roundcube (1.6.20+dfsg-0+deb13u1) trixie-security; urgency=3Dhigh
+
+ * New upstream security and bugfix release (closes: #1151279).
+ + Fix CVE-2026-113386: IMAP command injection via CRLF in `_uid` param=
eter
+ of mail/headers and mail/viewsource action.
+ + Fix bug where an alias login wasn't qualified by IMAP host.
+ + Add a size limit to the CSS proxy content processing.
+ + Fix SSRF filter (`is_local_url()`) bypass via NAT64 64:ff9b::/96.
+ + Fix remote content blocking bypass via SVG SMIL `by` attribute.
+ + Fix remote content blocking bypass via CSS escapes in FuncIRI attrib=
utes
+ (again).
+ + Fix passing potentially unsafe attachment content into ImageMagick on
+ image resize.
+ + Fix mail header injection via the From display-name in the Bounce (r=
esend)
+ action.
+ + Fix mail header injection via References/In-Reply-To/Message-ID/From
+ parameters.
+ + Fix object injection primitive in rcube_session::unserialize() via
+ =E2=80=9C!=E2=80=9D-prefixed session keys.
+ + Fix ImageMagick resource limits bypass by GD fallback during thumbna=
il
+ generation.
+ + Fix CSS scoping bypass in HTML messages using at-rules.
+ + Fix bug where deprecated action aliases bypassed `disabled_actions`
+ setting.
+ + Fix IMAP command injection via CRLF in `_flag` parameter of mail/mark
+ action.
+ + Fix CSRF validation bypass in the mark-as-junk action.
+ + Fix XSS issue in handling of password driver error responses.
+ + Fix mail header injection via subject of a message forwarded as
+ attachment.
+ + Fix mail header injection via media type in an inline image data URI.
+ + Fix bug where Password Modoboa driver could change password for anot=
her
+ account.
+ + Fix unsafe use of a login name in SquirrelMail import file path.
+ * Refresh d/patches.
+
+ -- Guilhem Moulin <guilhem@debian.org> Tue, 20 Oct 2026 07:00:29 +0200
+
roundcube (1.6.19+dfsg-0+deb13u1) trixie-security; urgency=3Dhigh
=20
* New upstream security and bugfix release (closes: #1146838).
diff -Nru roundcube-1.6.19+dfsg/debian/patches/Avoid-dependency-on-new-pack=
age-mlocati-ip-lib.patch roundcube-1.6.20+dfsg/debian/patches/Avoid-depende=
ncy-on-new-package-mlocati-ip-lib.patch
--- roundcube-1.6.19+dfsg/debian/patches/Avoid-dependency-on-new-package-ml=
ocati-ip-lib.patch 2026-09-06 13:22:41.000000000 +0200
+++ roundcube-1.6.20+dfsg/debian/patches/Avoid-dependency-on-new-package-ml=
ocati-ip-lib.patch 2026-10-20 07:00:29.000000000 +0200
@@ -11,9 +11,9 @@
Forwarded: not-needed
---
composer.json-dist | 3 +-
- program/lib/Roundcube/rcube_utils.php | 163 +++++++++++++++++++++++++++++=
-----
- tests/Framework/Utils.php | 85 ++++++++++++++++++
- 3 files changed, 225 insertions(+), 26 deletions(-)
+ program/lib/Roundcube/rcube_utils.php | 169 ++++++++++++++++++++++++++++-=
-----
+ tests/Framework/Utils.php | 85 +++++++++++++++++
+ 3 files changed, 228 insertions(+), 29 deletions(-)
=20
diff --git a/composer.json-dist b/composer.json-dist
index 1807004..ca3de26 100644
@@ -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 b10103e..2c1aff8 100644
+index 270a14f..94f0fc4 100644
--- a/program/lib/Roundcube/rcube_utils.php
+++ b/program/lib/Roundcube/rcube_utils.php
@@ -1,8 +1,5 @@
@@ -171,7 +171,7 @@
$host =3D trim($host, '[].');
=20
if (preg_match('/([0-9a-f.-]+)\.(nip|sslip)\.io$/i', $host, $=
matches)) {
-@@ -452,26 +554,39 @@ class rcube_utils
+@@ -452,29 +554,42 @@ class rcube_utils
}
}
=20
@@ -192,9 +192,12 @@
- '169.254.0.0/16', // link-local / cloud metadata
- '100.64.0.0/10', // RFC6598: Shared Address Space (c=
arrier-grade NAT)
- '::1/128',
+- '::/128',
- 'fc00::/7',
- 'fe80::/10', // IPv6 link-local
- '::ffff:0:0/96', // RFC5156
+- '64:ff9b::/96', // RFC 6052 NAT64 (maps IPv4 incl. =
private ranges into IPv6)
+- '64:ff9b:1::/48' // (RFC 8215 local-use NAT64)=20
+ if (is_string($address =3D \rcube_utils::inet_pton2($host))) {
+ $nets =3D [
+ ['0.0.0.0', '0.0.0.0'],
@@ -213,8 +216,11 @@
+ }
+ }
+ $nets[] =3D ['::1', '::1'];
++ $nets[] =3D ['::', '::'];
+ $nets[] =3D ['fc00::', 'fdff:ffff:ffff:ffff:ffff:ffff=
:ffff:ffff'];
+ $nets[] =3D ['fe80::', 'febf:ffff:ffff:ffff:ffff:ffff=
:ffff:ffff']; // IPv6 link-local
++ $nets[] =3D ['64:ff9b::', '64:ff9b::ffff:ffff']; // R=
FC 6052 NAT64 (maps IPv4 incl. private ranges into IPv6)
++ $nets[] =3D ['64:ff9b:1::', '64:ff9b:1:ffff:ffff:ffff=
:ffff:ffff']; // (RFC 8215 local-use NAT64)
+ }
=20
- foreach ($nets as $net) {
@@ -228,10 +234,10 @@
}
}
diff --git a/tests/Framework/Utils.php b/tests/Framework/Utils.php
-index 98f53d0..757c1c4 100644
+index 4325b0b..5769772 100644
--- a/tests/Framework/Utils.php
+++ b/tests/Framework/Utils.php
-@@ -571,6 +571,86 @@ class Framework_Utils extends TestCase
+@@ -588,6 +588,86 @@ class Framework_Utils extends TestCase
}
}
=20
@@ -318,7 +324,7 @@
/**
* Test is_local_url()
*
-@@ -590,12 +670,17 @@ class Framework_Utils extends TestCase
+@@ -607,12 +687,17 @@ class Framework_Utils extends TestCase
return [
// Local hosts
['https://127.0.0.1', true],
diff -Nru roundcube-1.6.19+dfsg/debian/patches/Fix-FTBFS-with-phpunit-11.pa=
tch roundcube-1.6.20+dfsg/debian/patches/Fix-FTBFS-with-phpunit-11.patch
--- roundcube-1.6.19+dfsg/debian/patches/Fix-FTBFS-with-phpunit-11.patch 20=
26-09-06 13:22:41.000000000 +0200
+++ roundcube-1.6.20+dfsg/debian/patches/Fix-FTBFS-with-phpunit-11.patch 20=
26-10-20 07:00:29.000000000 +0200
@@ -8765,7 +8765,7 @@
}
}
diff --git a/tests/Framework/Mime.php b/tests/Framework/Mime.php
-index abe9939..81d42f0 100644
+index b4266fd..602ffa9 100644
--- a/tests/Framework/Mime.php
+++ b/tests/Framework/Mime.php
@@ -1,11 +1,13 @@
@@ -8803,7 +8803,7 @@
=20
$this->assertEquals($results[$idx], $res, "Decode address gro=
ups (#$idx)");
}
-@@ -174,7 +176,7 @@ class Framework_Mime extends PHPUnit\Framework\TestCase
+@@ -189,7 +191,7 @@ class Framework_Mime extends PHPUnit\Framework\TestCase
];
=20
foreach ($test as $idx =3D> $item) {
@@ -8812,7 +8812,7 @@
$res =3D quoted_printable_encode($res);
=20
$this->assertEquals($item['out'], $res, "Header decoding for:=
" . $idx);
-@@ -186,7 +188,7 @@ class Framework_Mime extends PHPUnit\Framework\TestCase
+@@ -201,7 +203,7 @@ class Framework_Mime extends PHPUnit\Framework\TestCase
*/
function test_parse_headers()
{
@@ -8821,7 +8821,7 @@
=20
=20
$headers =3D "Subject: Test\r\n"
-@@ -197,7 +199,7 @@ class Framework_Mime extends PHPUnit\Framework\TestCase
+@@ -212,7 +214,7 @@ class Framework_Mime extends PHPUnit\Framework\TestCase
'to' =3D> 'test@test1.com test@test2.com'
];
=20
@@ -8830,7 +8830,7 @@
}
=20
/**
-@@ -208,7 +210,7 @@ class Framework_Mime extends PHPUnit\Framework\TestCase
+@@ -223,7 +225,7 @@ class Framework_Mime extends PHPUnit\Framework\TestCase
$raw =3D file_get_contents(TESTS_DIR . 'src/format-flowed-unfolde=
d.txt');
$flowed =3D file_get_contents(TESTS_DIR . 'src/format-flowed.txt'=
);
=20
@@ -8839,7 +8839,7 @@
}
=20
/**
-@@ -219,7 +221,7 @@ class Framework_Mime extends PHPUnit\Framework\TestCase
+@@ -234,7 +236,7 @@ class Framework_Mime extends PHPUnit\Framework\TestCase
$flowed =3D file_get_contents(TESTS_DIR . 'src/format-flowed.txt'=
);
$unfolded =3D file_get_contents(TESTS_DIR . 'src/format-flowed-un=
folded.txt');
=20
@@ -8848,7 +8848,7 @@
}
=20
/**
-@@ -234,7 +236,7 @@ class Framework_Mime extends PHPUnit\Framework\TestCase
+@@ -249,7 +251,7 @@ class Framework_Mime extends PHPUnit\Framework\TestCase
."> \r\n"
."Sed ut perspiciatis unde omnis iste natus error sit=
voluptatem";
=20
@@ -8857,7 +8857,7 @@
}
=20
/**
-@@ -248,7 +250,7 @@ class Framework_Mime extends PHPUnit\Framework\TestCase
+@@ -263,7 +265,7 @@ class Framework_Mime extends PHPUnit\Framework\TestCase
."=E3=81=97=E3=81=A6=E3=81=84=E3=82=8B=E3=81=AE=E3=82=
=92=E8=A6=8B=E3=81=BE=E3=81=97=E3=81=9F=E3=80=82";
$unfolded =3D "=E3=81=9D=E3=81=97=E3=81=A6=E3=82=B8=E3=83=A7=E3=
=83=90=E3=83=B3=E3=83=8B=E3=81=AF=E3=81=99=E3=81=90=E3=81=86=E3=81=97=E3=82=
=8D=E3=81=AE=E5=A4=A9=E6=B0=97=E8=BC=AA=E3=81=AE=E6=9F=B1=E3=81=8C=E3=81=84=
=E3=81=A4=E3=81=8B=E3=81=BC=E3=82=93=E3=82=84=E3=82=8A=E3=81=97=E3=81=9F=E4=
=B8=89=E8=A7=92=E6=A8=99=E3=81=AE=E5=BD=A2=E3=81=AB=E3=81=AA=E3=81=A3=E3=81=
=A6=E3=80=81=E3=81=97=E3=81=B0=E3=82=89=E3=81=8F=E8=9B=8D=E3=81=AE=E3=82=88=
=E3=81=86=E3=81=AB=E3=80=81=E3=81=BA=E3=81=8B=E3=81=BA=E3=81=8B=E6=B6=88=E3=
=81=88=E3=81=9F=E3=82=8A=E3=81=A8=E3=82=82=E3=81=A3=E3=81=9F=E3=82=8A=E3=81=
=97=E3=81=A6=E3=81=84=E3=82=8B=E3=81=AE=E3=82=92=E8=A6=8B=E3=81=BE=E3=81=97=
=E3=81=9F=E3=80=82";
=20
@@ -8866,7 +8866,7 @@
}
=20
/**
-@@ -306,8 +308,8 @@ class Framework_Mime extends PHPUnit\Framework\TestCase
+@@ -321,8 +323,8 @@ class Framework_Mime extends PHPUnit\Framework\TestCase
"this-is-just-some-blabla-to-make-this-more-than-seventy-=
five-characters-in-a-row\n-- this line should\nbe wrapped",
],
[
@@ -8877,7 +8877,7 @@
],
];
=20
-@@ -322,9 +324,9 @@ class Framework_Mime extends PHPUnit\Framework\TestCase
+@@ -337,9 +339,9 @@ class Framework_Mime extends PHPUnit\Framework\TestCase
function test_parse_message()
{
$file =3D file_get_contents(__DIR__ . '/../src/html.msg');
@@ -8889,7 +8889,7 @@
$this->assertSame('multipart/alternative', $result->mimetype);
$this->assertSame('1.0', $result->headers['mime-version']);
$this->assertSame('=3D_68eeaf4ab95b5312965e45c33362338e', $result=
->ctype_parameters['boundary']);
-@@ -355,9 +357,9 @@ class Framework_Mime extends PHPUnit\Framework\TestCase
+@@ -370,9 +372,9 @@ class Framework_Mime extends PHPUnit\Framework\TestCase
function test_file_content_type()
{
$file =3D INSTALL_PATH . 'program/resources/blocked.gif';
@@ -8901,7 +8901,7 @@
}
=20
/**
-@@ -365,10 +367,10 @@ class Framework_Mime extends PHPUnit\Framework\TestC=
ase
+@@ -380,10 +382,10 @@ class Framework_Mime extends PHPUnit\Framework\TestC=
ase
*/
function test_get_mime_extensions()
{
@@ -8916,7 +8916,7 @@
}
=20
/**
-@@ -377,7 +379,7 @@ class Framework_Mime extends PHPUnit\Framework\TestCase
+@@ -392,7 +394,7 @@ class Framework_Mime extends PHPUnit\Framework\TestCase
function test_image_content_type()
{
$file =3D file_get_contents(INSTALL_PATH . 'program/resources/blo=
cked.gif');
@@ -8925,7 +8925,7 @@
}
=20
/**
-@@ -385,9 +387,9 @@ class Framework_Mime extends PHPUnit\Framework\TestCase
+@@ -400,9 +402,9 @@ class Framework_Mime extends PHPUnit\Framework\TestCase
*/
function test_fix_mimetype()
{
@@ -10052,7 +10052,7 @@
$idents =3D $user->list_identities();
=20
diff --git a/tests/Framework/Utils.php b/tests/Framework/Utils.php
-index 26cf452..98f53d0 100644
+index 08d0880..4325b0b 100644
--- a/tests/Framework/Utils.php
+++ b/tests/Framework/Utils.php
@@ -1,11 +1,15 @@
@@ -10283,7 +10283,7 @@
$this->assertSame("#rcmbody { color: red; }", $mod);
=20
$style =3D 'body { background:url(alert('URL!')); }';
-@@ -343,7 +352,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -360,7 +369,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
:root * { color: red; }
:root > * { top: 0; }
';
@@ -10292,7 +10292,7 @@
=20
$this->assertStringContainsString('#rc .testone', $mod);
$this->assertStringContainsString('#rc .testthree.testfour', $mod=
);
-@@ -361,24 +370,24 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
+@@ -378,24 +387,24 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
=20
function test_xss_entity_decode()
{
@@ -10322,7 +10322,7 @@
{
return [
[
-@@ -453,9 +462,10 @@ class Framework_Utils extends PHPUnit\Framework\TestC=
ase
+@@ -470,9 +479,10 @@ class Framework_Utils extends PHPUnit\Framework\TestC=
ase
*
* @dataProvider data_parse_css_block
*/
@@ -10334,7 +10334,7 @@
}
=20
/**
-@@ -470,7 +480,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -487,7 +497,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
];
=20
foreach ($data as $text =3D> $res) {
@@ -10343,7 +10343,7 @@
$this->assertSame($res, $result);
}
}
-@@ -483,7 +493,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -500,7 +510,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
$data =3D ['', 'a,b,c', 'a', ',', ',a'];
=20
foreach ($data as $text) {
@@ -10352,7 +10352,7 @@
$this->assertSame(explode(',', $text), $result);
}
}
-@@ -498,7 +508,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -515,7 +525,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
];
=20
foreach ($input as $idx =3D> $value) {
@@ -10361,7 +10361,7 @@
}
=20
$input =3D [
-@@ -506,7 +516,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -523,7 +533,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
];
=20
foreach ($input as $idx =3D> $value) {
@@ -10370,7 +10370,7 @@
}
}
=20
-@@ -516,13 +526,13 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
+@@ -533,13 +543,13 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
function test_get_input_string()
{
$_GET =3D [];
@@ -10387,7 +10387,7 @@
}
=20
/**
-@@ -530,18 +540,18 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
+@@ -547,18 +557,18 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
*/
function test_is_simple_string()
{
@@ -10418,7 +10418,7 @@
}
=20
/**
-@@ -556,7 +566,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -573,7 +583,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
];
=20
foreach ($test as $v) {
@@ -10427,7 +10427,7 @@
$this->assertSame($v[2], $result);
}
}
-@@ -646,7 +656,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -668,7 +678,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
];
=20
foreach ($test as $datetime =3D> $ts) {
@@ -10436,7 +10436,7 @@
$this->assertSame($ts, $result, "Error parsing date: $datetim=
e");
}
}
-@@ -673,7 +683,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -695,7 +705,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
];
=20
foreach ($test as $datetime =3D> $ts) {
@@ -10445,7 +10445,7 @@
$this->assertSame($ts, $result ? $result->format('Y-m-d') : f=
alse, "Error parsing date: $datetime");
}
=20
-@@ -683,7 +693,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -705,7 +715,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
];
=20
foreach ($test as $datetime =3D> $ts) {
@@ -10454,7 +10454,7 @@
$this->assertSame($ts, $result ? $result->format('Y-m-d H:i:s=
') : false, "Error parsing date: $datetime");
}
=20
-@@ -692,7 +702,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -714,7 +724,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
];
=20
foreach ($test as $datetime =3D> $ts) {
@@ -10463,7 +10463,7 @@
$this->assertSame($ts, $result ? $result->format('Y-m-d H:i:s=
O') : false, "Error parsing date: $datetime");
}
}
-@@ -702,17 +712,17 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
+@@ -724,17 +734,17 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
*/
function test_anytodatetime_timezone()
{
@@ -10484,7 +10484,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");
}
-@@ -731,7 +741,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -753,7 +763,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
];
=20
foreach ($test as $data) {
@@ -10493,7 +10493,7 @@
$this->assertSame($data[2], $result, "Error formatting date: =
" . $data[0]);
}
}
-@@ -750,7 +760,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -772,7 +782,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
];
=20
foreach ($test as $input =3D> $output) {
@@ -10502,7 +10502,7 @@
$this->assertSame($output, $result);
}
}
-@@ -775,7 +785,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -797,7 +807,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
];
=20
foreach ($test as $input =3D> $output) {
@@ -10511,7 +10511,7 @@
$this->assertSame($output, $result, "Error normalizing '$inpu=
t'");
}
}
-@@ -798,7 +808,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -820,7 +830,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
];
=20
foreach ($test as $idx =3D> $params) {
@@ -10520,7 +10520,7 @@
$this->assertSame($params[2], $result, "words_match() at inde=
x $idx");
}
}
-@@ -824,7 +834,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -846,7 +856,7 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
}
=20
foreach ($test as $input =3D> $output) {
@@ -10529,7 +10529,7 @@
$this->assertSame($output, $result);
}
}
-@@ -834,17 +844,17 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
+@@ -856,17 +866,17 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
*/
function test_random_bytes()
{
@@ -10553,7 +10553,7 @@
{
=20
/*
-@@ -881,9 +891,10 @@ class Framework_Utils extends PHPUnit\Framework\TestC=
ase
+@@ -903,9 +913,10 @@ class Framework_Utils extends PHPUnit\Framework\TestC=
ase
* @param string $encoded Encoded email address
* @dataProvider data_idn_convert
*/
@@ -10565,7 +10565,7 @@
}
=20
/**
-@@ -893,9 +904,10 @@ class Framework_Utils extends PHPUnit\Framework\TestC=
ase
+@@ -915,9 +926,10 @@ class Framework_Utils extends PHPUnit\Framework\TestC=
ase
* @param string $encoded Encoded email address
* @dataProvider data_idn_convert
*/
@@ -10577,7 +10577,7 @@
}
=20
/**
-@@ -903,14 +915,14 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
+@@ -925,14 +937,14 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
*/
function test_idn_to_ascii_special()
{
@@ -10595,7 +10595,7 @@
{
return [
['%z', 'hostname', 'hostname'],
-@@ -925,15 +937,16 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
+@@ -947,15 +959,16 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
*
* @dataProvider data_parse_host
*/
@@ -10614,7 +10614,7 @@
{
return [
[['hostname', null, null], ['hostname', null, null]],
-@@ -956,15 +969,16 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
+@@ -978,15 +991,16 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
*
* @dataProvider data_parse_host_uri
*/
@@ -10633,7 +10633,7 @@
return [
['both', 'Fwd: Re: Test subject both', 'Test subject both'=
],
['both', 'Re: Fwd: Test subject both', 'Test subject both'=
],
-@@ -982,8 +996,9 @@ class Framework_Utils extends PHPUnit\Framework\TestCa=
se
+@@ -1004,8 +1018,9 @@ class Framework_Utils extends PHPUnit\Framework\Test=
Case
*=20
* @dataProvider data_remove_subject_prefix
*/
@@ -10644,7 +10644,7 @@
}
=20
/**
-@@ -991,13 +1006,13 @@ class Framework_Utils extends PHPUnit\Framework\Tes=
tCase
+@@ -1013,13 +1028,13 @@ class Framework_Utils extends PHPUnit\Framework\Te=
stCase
*/
function test_server_name()
{
@@ -10661,7 +10661,7 @@
}
=20
/**
-@@ -1007,31 +1022,31 @@ class Framework_Utils extends PHPUnit\Framework\Te=
stCase
+@@ -1029,31 +1044,31 @@ class Framework_Utils extends PHPUnit\Framework\Te=
stCase
{
$_SERVER['test'] =3D 'test.com';
=20
@@ -10860,7 +10860,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 03ab2db..a61f7da 100644
+index 794a077..85cbe9b 100644
--- a/tests/Framework/Washtml.php
+++ b/tests/Framework/Washtml.php
@@ -1,11 +1,14 @@
@@ -11061,7 +11061,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
-@@ -573,9 +576,10 @@ class Framework_Washtml extends PHPUnit\Framework\Tes=
tCase
+@@ -622,9 +625,10 @@ class Framework_Washtml extends PHPUnit\Framework\Tes=
tCase
*
* @dataProvider data_wash_svg_tests
*/
@@ -11073,7 +11073,7 @@
$washed =3D $washer->wash($input);
=20
$this->assertSame($expected, $this->cleanupResult($washed), "SVG =
content");
-@@ -584,7 +588,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
+@@ -633,7 +637,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
/**
* Test cases for various XSS issues
*/
@@ -11082,7 +11082,7 @@
{
return [
[
-@@ -660,9 +664,10 @@ class Framework_Washtml extends PHPUnit\Framework\Tes=
tCase
+@@ -709,9 +713,10 @@ class Framework_Washtml extends PHPUnit\Framework\Tes=
tCase
*
* @dataProvider data_wash_xss_tests
*/
@@ -11094,7 +11094,7 @@
$washed =3D $washer->wash($input);
=20
$this->assertSame($expected, $this->cleanupResult($washed), "XSS =
issues");
-@@ -676,7 +681,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
+@@ -725,7 +730,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
@@ -11103,7 +11103,7 @@
$washed =3D $washer->wash($html);
=20
$this->assertTrue(strpos($washed, $exp) !=3D=3D false, "Position:=
fixed (#5264)");
-@@ -720,7 +725,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
+@@ -769,7 +774,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
@@ -11112,7 +11112,7 @@
$washed =3D $washer->wash($mathml);
=20
// remove whitespace between tags
-@@ -737,7 +742,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
+@@ -786,7 +791,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
{
$html =3D "<input type=3D\"image\" src=3D\"http://TRACKING_URL/\"=
>";
=20
@@ -11121,7 +11121,7 @@
$washed =3D $washer->wash($html);
=20
$this->assertTrue($washer->extlinks);
-@@ -745,7 +750,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
+@@ -794,7 +799,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
=20
$html =3D "<video src=3D\"http://TRACKING_URL/\">";
=20
@@ -11130,7 +11130,7 @@
$washed =3D $washer->wash($html);
=20
$this->assertTrue($washer->extlinks);
-@@ -773,14 +778,14 @@ class Framework_Washtml extends PHPUnit\Framework\Te=
stCase
+@@ -822,14 +827,14 @@ class Framework_Washtml extends PHPUnit\Framework\Te=
stCase
];
=20
foreach ($html as $item) {
@@ -11147,7 +11147,7 @@
$washed =3D $washer->wash($item[0]);
=20
$this->assertFalse($washer->extlinks);
-@@ -791,7 +796,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
+@@ -840,7 +845,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
@@ -11156,7 +11156,7 @@
$washed =3D $washer->wash($html);
=20
$this->assertStringNotContainsString('onerror=3Dalert(1)>', $wash=
ed);
-@@ -803,7 +808,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
+@@ -852,7 +857,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
*/
function test_css_prefix()
{
@@ -11165,7 +11165,7 @@
=20
$html =3D '<p id=3D"my-id">'
. '<label for=3D"my-other-id" class=3D"my-class1 my-class2">t=
est</label>'
-@@ -831,14 +836,14 @@ class Framework_Washtml extends PHPUnit\Framework\Te=
stCase
+@@ -880,14 +885,14 @@ class Framework_Washtml extends PHPUnit\Framework\Te=
stCase
{
$html =3D '<p><?xml:namespace prefix =3D "xsl" /></p>';
=20
@@ -11182,7 +11182,7 @@
$washed =3D $this->cleanupResult($washer->wash($html));
=20
$this->assertSame($washed, 'HTML');
-@@ -849,7 +854,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
+@@ -898,7 +903,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
*/
function test_missing_tags()
{
@@ -11191,7 +11191,7 @@
=20
$html =3D '<head></head>First line<br />Second line';
$washed =3D $washer->wash($html);
-@@ -891,7 +896,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
+@@ -940,7 +945,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
{
$html =3D '<p><![CDATA[<script>alert(document.cookie)</script>]]>=
</p>';
=20
@@ -11200,7 +11200,7 @@
$washed =3D $washer->wash($html);
=20
$this->assertTrue(strpos($washed, '<script>') =3D=3D=3D false, "C=
DATA content");
-@@ -903,7 +908,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
+@@ -952,7 +957,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
function test_resolve_base()
{
$html =3D file_get_contents(TESTS_DIR . 'src/htmlbase.txt');
@@ -11209,7 +11209,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]");
-@@ -949,7 +954,7 @@ class Framework_Washtml extends PHPUnit\Framework\Test=
Case
+@@ -998,7 +1003,7 @@ class Framework_Washtml extends PHPUnit\Framework\Tes=
tCase
<tr><td></td></tr>
</table>';
=20
@@ -12050,7 +12050,7 @@
$result =3D $mail->headers();
=20
diff --git a/tests/Rcmail/Sendmail.php b/tests/Rcmail/Sendmail.php
-index 9ccb87e..57183e8 100644
+index a29fcf2..7b61e95 100644
--- a/tests/Rcmail/Sendmail.php
+++ b/tests/Rcmail/Sendmail.php
@@ -1,11 +1,14 @@
@@ -12093,7 +12093,7 @@
=20
$result =3D $sendmail->get_identity($identity['identity_id']);
=20
-@@ -97,7 +100,7 @@ class Rcmail_RcmailSendmail extends ActionTestCase
+@@ -115,7 +118,7 @@ class Rcmail_RcmailSendmail extends ActionTestCase
/**
* Data for test_convert()
*/
@@ -12102,7 +12102,7 @@
{
return [
[
-@@ -156,9 +159,10 @@ class Rcmail_RcmailSendmail extends ActionTestCase
+@@ -174,9 +177,10 @@ class Rcmail_RcmailSendmail extends ActionTestCase
/**
* @dataProvider data_email_input_format
*/
@@ -12114,7 +12114,7 @@
$sendmail->options['charset'] =3D $charset;
=20
$this->assertEquals($output, $sendmail->email_input_format($input=
));
-@@ -178,24 +182,24 @@ class Rcmail_RcmailSendmail extends ActionTestCase
+@@ -196,24 +200,24 @@ class Rcmail_RcmailSendmail extends ActionTestCase
function test_draftinfo_encode_and_decode()
{
$input =3D ['test' =3D> 'test'];
@@ -12147,7 +12147,7 @@
}
=20
/**
-@@ -203,14 +207,14 @@ class Rcmail_RcmailSendmail extends ActionTestCase
+@@ -221,14 +225,14 @@ class Rcmail_RcmailSendmail extends ActionTestCase
*/
function test_headers_output()
{
@@ -12165,7 +12165,7 @@
$sendmail->options['charset'] =3D RCUBE_CHARSET;
$sendmail->options['message'] =3D $message;
=20
-@@ -229,10 +233,10 @@ class Rcmail_RcmailSendmail extends ActionTestCase
+@@ -247,10 +251,10 @@ class Rcmail_RcmailSendmail extends ActionTestCase
*/
function test_reply_subject()
{
@@ -12180,7 +12180,7 @@
}
=20
/**
-@@ -240,9 +244,9 @@ class Rcmail_RcmailSendmail extends ActionTestCase
+@@ -258,9 +262,9 @@ class Rcmail_RcmailSendmail extends ActionTestCase
*/
function test_compose_subject()
{
@@ -12192,7 +12192,7 @@
=20
$_POST =3D ['_subject' =3D> 'test'];
=20
-@@ -256,9 +260,9 @@ class Rcmail_RcmailSendmail extends ActionTestCase
+@@ -274,9 +278,9 @@ class Rcmail_RcmailSendmail extends ActionTestCase
*/
function test_mdn_checkbox()
{
@@ -12204,7 +12204,7 @@
=20
$result =3D $sendmail->mdn_checkbox([]);
=20
-@@ -270,9 +274,9 @@ class Rcmail_RcmailSendmail extends ActionTestCase
+@@ -288,9 +292,9 @@ class Rcmail_RcmailSendmail extends ActionTestCase
*/
function test_dsn_checkbox()
{
@@ -12216,7 +12216,7 @@
=20
$result =3D $sendmail->dsn_checkbox([]);
=20
-@@ -284,9 +288,9 @@ class Rcmail_RcmailSendmail extends ActionTestCase
+@@ -302,9 +306,9 @@ class Rcmail_RcmailSendmail extends ActionTestCase
*/
function test_priority_selector()
{
@@ -12228,7 +12228,7 @@
=20
$result =3D $sendmail->priority_selector([]);
=20
-@@ -306,14 +310,14 @@ class Rcmail_RcmailSendmail extends ActionTestCase
+@@ -324,14 +328,14 @@ class Rcmail_RcmailSendmail extends ActionTestCase
*/
function test_identity_select()
{
@@ -12246,7 +12246,7 @@
$this->assertSame(null, $result);
=20
$identities =3D [
-@@ -349,26 +353,26 @@ class Rcmail_RcmailSendmail extends ActionTestCase
+@@ -367,26 +371,26 @@ class Rcmail_RcmailSendmail extends ActionTestCase
$message->headers->to =3D 'ident2@domain.tld';
$message->headers->from =3D 'from@other.domain.tld';
=20
@@ -12277,7 +12277,7 @@
$this->assertSame($identities[2], $result);
}
=20
-@@ -395,15 +399,15 @@ class Rcmail_RcmailSendmail extends ActionTestCase
+@@ -413,15 +417,15 @@ class Rcmail_RcmailSendmail extends ActionTestCase
],
];
=20
@@ -12297,7 +12297,7 @@
=20
$this->assertSame($identities[1], $res);
}
-@@ -436,23 +440,23 @@ class Rcmail_RcmailSendmail extends ActionTestCase
+@@ -454,23 +458,23 @@ class Rcmail_RcmailSendmail extends ActionTestCase
],
];
=20
diff -Nru roundcube-1.6.19+dfsg/index.php roundcube-1.6.20+dfsg/index.php
--- roundcube-1.6.19+dfsg/index.php 2026-09-06 10:27:09.000000000 +0200
+++ roundcube-1.6.20+dfsg/index.php 2026-10-19 08:49:43.000000000 +0200
@@ -264,15 +264,5 @@
=20
$RCMAIL->output->send($plugin['task']);
}
-else {
- // CSRF prevention
- $RCMAIL->request_security_check();
-
- // check access to disabled actions
- $disabled_actions =3D (array) $RCMAIL->config->get('disabled_actions');
- if (in_array($RCMAIL->task . '.' . ($RCMAIL->action ?: 'index'), $disa=
bled_actions)) {
- rcube::raise_error(['code' =3D> 404, 'message' =3D> "Action disabl=
ed"], true, true);
- }
-}
=20
$RCMAIL->action_handler();
diff -Nru roundcube-1.6.19+dfsg/plugins/markasjunk/markasjunk.php roundcube=
-1.6.20+dfsg/plugins/markasjunk/markasjunk.php
--- roundcube-1.6.19+dfsg/plugins/markasjunk/markasjunk.php 2026-09-06 10:2=
7:09.000000000 +0200
+++ roundcube-1.6.20+dfsg/plugins/markasjunk/markasjunk.php 2026-10-19 08:4=
9:43.000000000 +0200
@@ -140,7 +140,7 @@
$is_spam =3D $this->rcube->action =3D=3D 'plugin.markasjunk.jun=
k';
$uids =3D rcube_utils::get_input_value('_uid', rcube_utils::=
INPUT_POST);
$mbox_name =3D rcube_utils::get_input_string('_mbox', rcube_utils=
::INPUT_POST);
- $messageset =3D rcmail::get_uids($uids, $mbox_name, $multifolder);
+ $messageset =3D rcmail::get_uids($uids, $mbox_name, $multifolder, =
rcube_utils::INPUT_POST);
$dest_mbox =3D $is_spam ? $this->spam_mbox : $this->ham_mbox;
=20
// special case when select all is used, uid is '*', and not in mu=
lti folder mode and we are using a driver
diff -Nru roundcube-1.6.19+dfsg/plugins/password/drivers/directadmin.php ro=
undcube-1.6.20+dfsg/plugins/password/drivers/directadmin.php
--- roundcube-1.6.19+dfsg/plugins/password/drivers/directadmin.php 2026-09-=
06 10:27:09.000000000 +0200
+++ roundcube-1.6.20+dfsg/plugins/password/drivers/directadmin.php 2026-10-=
19 08:49:43.000000000 +0200
@@ -60,7 +60,7 @@
}
=20
if (isset($response['error']) && $response['error'] =3D=3D 1) {
- return ['code' =3D> PASSWORD_ERROR, 'message' =3D> strip_tags(=
$response['text'])];
+ return ['code' =3D> PASSWORD_ERROR, 'message' =3D> $response['=
text']];
}
=20
return PASSWORD_SUCCESS;
diff -Nru roundcube-1.6.19+dfsg/plugins/password/drivers/modoboa.php roundc=
ube-1.6.20+dfsg/plugins/password/drivers/modoboa.php
--- roundcube-1.6.19+dfsg/plugins/password/drivers/modoboa.php 2026-09-06 1=
0:27:09.000000000 +0200
+++ roundcube-1.6.20+dfsg/plugins/password/drivers/modoboa.php 2026-10-19 0=
8:49:43.000000000 +0200
@@ -82,20 +82,35 @@
}
=20
// Get user ID (pk)
- $userid =3D $decoded[0]->pk;
+ $userid =3D null;
+ $user =3D null;
+ foreach ($decoded as $account) {
+ if (isset($account->username) && $account->username =3D=3D=3D =
$username) {
+ $userid =3D $account->pk;
+ $user =3D [
+ 'username' =3D> $account->username,
+ 'mailbox' =3D> $account->mailbox,
+ 'role' =3D> $account->role,
+ ];
+ break;
+ }
+ }
+
+ if ($user =3D=3D=3D null) {
+ return PASSWORD_CONNECT_ERROR;
+ }
=20
// Encode json with new password
- $ret['username'] =3D $decoded[0]->username;
- $ret['mailbox'] =3D $decoded[0]->mailbox;
- $ret['role'] =3D $decoded[0]->role;
- $ret['password'] =3D $passwd; // new password
- $encoded =3D json_encode($ret);
+ $user['password'] =3D $passwd;
+ $encoded =3D json_encode($user);
+
+ $url =3D "https://{$host}/api/v1/accounts/{$userid}/";
=20
// Call HTTP API Modoboa
$curl =3D curl_init();
=20
curl_setopt_array($curl, [
- CURLOPT_URL =3D> "https://" . $host . "/api/v1/acco=
unts/" . $userid . "/",
+ CURLOPT_URL =3D> "https://{$host}/api/v1/accounts/{=
$userid}/",
CURLOPT_RETURNTRANSFER =3D> true,
CURLOPT_ENCODING =3D> "",
CURLOPT_MAXREDIRS =3D> 10,
diff -Nru roundcube-1.6.19+dfsg/plugins/password/password.php roundcube-1.6=
=2E20+dfsg/plugins/password/password.php
--- roundcube-1.6.19+dfsg/plugins/password/password.php 2026-09-06 10:27:09=
=2E000000000 +0200
+++ roundcube-1.6.20+dfsg/plugins/password/password.php 2026-10-19 08:49:43=
=2E000000000 +0200
@@ -425,7 +425,7 @@
}
=20
if ($message) {
- $reason .=3D ' ' . $message;
+ $reason .=3D ' ' . rcube::Q($message, 'strict', false);
}
=20
return $reason;
diff -Nru roundcube-1.6.19+dfsg/plugins/squirrelmail_usercopy/squirrelmail_=
usercopy.php roundcube-1.6.20+dfsg/plugins/squirrelmail_usercopy/squirrelma=
il_usercopy.php
--- roundcube-1.6.19+dfsg/plugins/squirrelmail_usercopy/squirrelmail_userco=
py.php 2026-09-06 10:27:09.000000000 +0200
+++ roundcube-1.6.20+dfsg/plugins/squirrelmail_usercopy/squirrelmail_userco=
py.php 2026-10-19 08:49:43.000000000 +0200
@@ -170,7 +170,10 @@
$rcmail =3D rcmail::get_instance();
=20
/**** File based backend ****/
- if ($rcmail->config->get('squirrelmail_driver') =3D=3D 'file' && (=
$srcdir =3D $rcmail->config->get('squirrelmail_data_dir'))) {
+ if ($rcmail->config->get('squirrelmail_driver') =3D=3D 'file'
+ && ($srcdir =3D $rcmail->config->get('squirrelmail_data_dir'))
+ && strpos($uname, '/') =3D=3D=3D false // security check
+ ) {
if (($hash_level =3D $rcmail->config->get('squirrelmail_data_d=
ir_hash_level')) > 0) {
$srcdir =3D slashify($srcdir).chunk_split(substr(base_conv=
ert(crc32($uname), 10, 16), 0, $hash_level), 1, '/');
}
diff -Nru roundcube-1.6.19+dfsg/program/actions/contacts/upload_photo.php r=
oundcube-1.6.20+dfsg/program/actions/contacts/upload_photo.php
--- roundcube-1.6.19+dfsg/program/actions/contacts/upload_photo.php 2026-09=
-06 10:27:09.000000000 +0200
+++ roundcube-1.6.20+dfsg/program/actions/contacts/upload_photo.php 2026-10=
-19 08:49:43.000000000 +0200
@@ -25,7 +25,7 @@
*
* @var array
*/
- public static $IMAGE_TYPES =3D ['jpeg','jpg','jp2','tiff','tif','bmp',=
'eps','gif','png','png8','png24','png32','svg','ico'];
+ public static $IMAGE_TYPES =3D ['jpeg', 'jpg', 'jp2', 'tiff', 'tif', '=
bmp', 'gif', 'png', 'png8', 'png24', 'png32', 'svg', 'ico'];
=20
/**
* Request handler.
diff -Nru roundcube-1.6.19+dfsg/program/actions/mail/compose.php roundcube-=
1.6.20+dfsg/program/actions/mail/compose.php
--- roundcube-1.6.19+dfsg/program/actions/mail/compose.php 2026-09-06 10:27=
:09.000000000 +0200
+++ roundcube-1.6.20+dfsg/program/actions/mail/compose.php 2026-10-19 08:49=
:43.000000000 +0200
@@ -1214,7 +1214,11 @@
}
=20
// generate (unique) attachment name
- $name =3D strlen($message->subject) ? mb_substr($message->subj=
ect, 0, 64) : 'message_rfc822';
+ $name =3D 'message_rfc822';
+ if (strlen($message->subject)) {
+ // Note: Replace any whitespace characters (most important=
ly \r and \n)
+ $name =3D mb_substr(trim(preg_replace('/\s+/', ' ', $messa=
ge->subject)), 0, 64);
+ }
if (!empty($names[$name])) {
$names[$name]++;
$name .=3D '_' . $names[$name];
diff -Nru roundcube-1.6.19+dfsg/program/actions/mail/headers.php roundcube-=
1.6.20+dfsg/program/actions/mail/headers.php
--- roundcube-1.6.19+dfsg/program/actions/mail/headers.php 2026-09-06 10:27=
:09.000000000 +0200
+++ roundcube-1.6.20+dfsg/program/actions/mail/headers.php 2026-10-19 08:49=
:43.000000000 +0200
@@ -32,7 +32,8 @@
$uid =3D rcube_utils::get_input_string('_uid', rcube_utils::INP=
UT_GP);
$inline =3D $rcmail->output instanceof rcmail_output_html;
=20
- if (!$uid) {
+ if (!$uid || preg_match('/[\r\n]/', $uid)) {
+ rcube::raise_error("Message UID {$uid} not found", true, true);
exit;
}
=20
diff -Nru roundcube-1.6.19+dfsg/program/actions/mail/viewsource.php roundcu=
be-1.6.20+dfsg/program/actions/mail/viewsource.php
--- roundcube-1.6.19+dfsg/program/actions/mail/viewsource.php 2026-09-06 10=
:27:09.000000000 +0200
+++ roundcube-1.6.20+dfsg/program/actions/mail/viewsource.php 2026-10-19 08=
:49:43.000000000 +0200
@@ -35,7 +35,8 @@
ob_end_clean();
=20
// similar code as in program/steps/mail/get.inc
- if ($uid =3D rcube_utils::get_input_string('_uid', rcube_utils::IN=
PUT_GET)) {
+ $uid =3D rcube_utils::get_input_string('_uid', rcube_utils::INPUT_=
GET);
+ if ($uid && !preg_match('/[\r\n]/', $uid)) {
if ($pos =3D strpos($uid, '.')) {
$message =3D new rcube_message($uid);
$headers =3D $message->headers;
diff -Nru roundcube-1.6.19+dfsg/program/actions/utils/modcss.php roundcube-=
1.6.20+dfsg/program/actions/utils/modcss.php
--- roundcube-1.6.19+dfsg/program/actions/utils/modcss.php 2026-09-06 10:27=
:09.000000000 +0200
+++ roundcube-1.6.20+dfsg/program/actions/utils/modcss.php 2026-10-19 08:49=
:43.000000000 +0200
@@ -20,6 +20,8 @@
=20
class rcmail_action_utils_modcss extends rcmail_action
{
+ private const MAX_SIZE =3D 5 * 1024 * 1024;
+
/**
* Request handler.
*
@@ -47,14 +49,25 @@
$ctype =3D null;
=20
try {
- $client =3D rcube::get_instance()->get_http_client(['allow_red=
irects' =3D> false]);
+ // Be strict, and limit the response size
+ $options =3D [
+ 'allow_redirects' =3D> false,
+ 'read_timeout' =3D> 10,
+ 'stream' =3D> true,
+ ];
+
+ $client =3D rcube::get_instance()->get_http_client($options);
$response =3D $client->get($realurl);
=20
- if (!empty($response)) {
- $ctype =3D $response->getHeader('Content-Type');
- $ctype =3D !empty($ctype) ? $ctype[0] : '';
- $source =3D $response->getBody();
+ $ctype =3D $response->getHeader('Content-Type');
+ $ctype =3D !empty($ctype) ? $ctype[0] : '';
+
+ $stream =3D $response->getBody();
+ $source =3D '';
+ while (!$stream->eof() && strlen($source) < self::MAX_SIZE) {
+ $source .=3D $stream->read(1024);
}
+ $stream->close();
}
catch (Exception $e) {
rcube::raise_error($e, true, false);
diff -Nru roundcube-1.6.19+dfsg/program/include/rcmail_attachment_handler.p=
hp roundcube-1.6.20+dfsg/program/include/rcmail_attachment_handler.php
--- roundcube-1.6.19+dfsg/program/include/rcmail_attachment_handler.php 202=
6-09-06 10:27:09.000000000 +0200
+++ roundcube-1.6.20+dfsg/program/include/rcmail_attachment_handler.php 202=
6-10-19 08:49:43.000000000 +0200
@@ -97,7 +97,8 @@
$file_id =3D preg_replace('/^rcmfile/', '', $file_id);
$compose =3D $_SESSION['compose_data_' . $compose_id] ?? null;
=20
- if ($compose && ($this->upload =3D $compose['attachments'][$fi=
le_id])) {
+ if ($compose && !empty($compose['attachments'][$file_id])) {
+ $this->upload =3D $compose['attachments'][$file_id];
$this->filename =3D $this->upload['name'];
$this->mimetype =3D $this->upload['mimetype'];
$this->size =3D $this->upload['size'];
diff -Nru roundcube-1.6.19+dfsg/program/include/rcmail.php roundcube-1.6.20=
+dfsg/program/include/rcmail.php
--- roundcube-1.6.19+dfsg/program/include/rcmail.php 2026-09-06 10:27:09.00=
0000000 +0200
+++ roundcube-1.6.20+dfsg/program/include/rcmail.php 2026-10-19 08:49:43.00=
0000000 +0200
@@ -224,6 +224,9 @@
*/
public function action_handler()
{
+ // CSRF prevention
+ $this->request_security_check();
+
// we're ready, user is authenticated and the request is safe
$plugin =3D $this->plugins->exec_hook('ready', ['task' =3D> $this-=
>task, 'action' =3D> $this->action]);
=20
@@ -237,13 +240,27 @@
$this->output->send();
}
=20
- $task =3D $this->action =3D=3D 'save-pref' ? 'utils' : $this=
->task;
- $task =3D $task =3D=3D 'addressbook' ? 'contacts' : $task;
- $task_class =3D "rcmail_action_{$task}_index";
+ $task =3D $this->action =3D=3D 'save-pref' ? 'utils' : $this->task;
+ $task =3D $task =3D=3D 'addressbook' ? 'contacts' : $task;
+
+ // check access to disabled actions
+ $disabled_actions =3D (array) $this->config->get('disabled_actions=
');
+ if (in_array($task . '.' . ($this->action ?: 'index'), $disabled_a=
ctions)) {
+ self::raise_error(['code' =3D> 404, 'message' =3D> 'Action dis=
abled'], true, true);
+ }
=20
// execute the action index handler
+ $task_class =3D "rcmail_action_{$task}_index";
if (class_exists($task_class)) {
- $task_handler =3D new $task_class;
+ $task_handler =3D new $task_class();
+
+ // check access to disabled actions (resolve an alias)
+ if ($this->action && !empty($task_handler::$aliases[$this->act=
ion])) {
+ if (in_array($task . '.' . $task_handler::$aliases[$this->=
action], $disabled_actions)) {
+ self::raise_error(['code' =3D> 404, 'message' =3D> 'Ac=
tion disabled'], true, true);
+ }
+ }
+
$task_handler->run();
}
=20
diff -Nru roundcube-1.6.19+dfsg/program/include/rcmail_sendmail.php roundcu=
be-1.6.20+dfsg/program/include/rcmail_sendmail.php
--- roundcube-1.6.19+dfsg/program/include/rcmail_sendmail.php 2026-09-06 10=
:27:09.000000000 +0200
+++ roundcube-1.6.20+dfsg/program/include/rcmail_sendmail.php 2026-10-19 08=
:49:43.000000000 +0200
@@ -179,9 +179,6 @@
$message_id =3D $this->rcmail->gen_message_id($from);
}
=20
- // Don't allow CRLF in subject (#8404)
- $subject =3D trim(preg_replace('/[\r\n]+/', ' ', $subject));
-
$this->options['dsn_enabled'] =3D $dsn_enabled;
$this->options['from'] =3D $from;
$this->options['mailto'] =3D $mailto;
@@ -206,7 +203,7 @@
];
=20
if (!empty($identity_arr['organization'])) {
- $headers['Organization'] =3D preg_replace('/[\r\n]+/', ' ', $i=
dentity_arr['organization']);
+ $headers['Organization'] =3D $identity_arr['organization'];
}
=20
if ($mdn_enabled) {
@@ -255,6 +252,13 @@
}
}
=20
+ // For security reasons do not allow new-line characters in headers
+ foreach ($headers as $idx =3D> $value) {
+ if (is_string($value)) {
+ $headers[$idx] =3D trim(preg_replace('/[\r\n\t\s]+/', ' ',=
$value));
+ }
+ }
+
return array_filter($headers);
}
=20
@@ -695,7 +699,7 @@
$hash =3D md5($data) . '@' . $domain;
$mime_type =3D $matches[2][$idx][0];
=20
- if (empty($mime_type)) {
+ if (empty($mime_type) || !rcube_mime::is_mimetype_valid($m=
ime_type)) {
$mime_type =3D rcube_mime::image_content_type($data);
}
=20
diff -Nru roundcube-1.6.19+dfsg/program/lib/Roundcube/rcube_image.php round=
cube-1.6.20+dfsg/program/lib/Roundcube/rcube_image.php
--- roundcube-1.6.19+dfsg/program/lib/Roundcube/rcube_image.php 2026-09-06 =
10:27:09.000000000 +0200
+++ roundcube-1.6.20+dfsg/program/lib/Roundcube/rcube_image.php 2026-10-19 =
08:49:43.000000000 +0200
@@ -148,7 +148,8 @@
$result =3D ($this->image_file =3D=3D $filename || copy($t=
his->image_file, $filename)) ? '' : false;
}
else {
- $valid_types =3D "bmp,eps,gif,jp2,jpg,png,svg,tif";
+ // Note: We don't support types like svg or eps for securi=
ty reasons
+ $valid_types =3D 'bmp,gif,jp2,jpg,png,tif';
=20
if (in_array($type, explode(',', $valid_types))) { // Vali=
d type?
if ($scale >=3D 1) {
@@ -364,7 +365,7 @@
$props =3D $this->props();
=20
// do we have enough memory? (#1489937)
- if (strtoupper(substr(PHP_OS, 0, 3)) =3D=3D 'WIN' && !$this->mem_c=
heck($props)) {
+ if (!$this->mem_check($props)) {
return false;
}
=20
diff -Nru roundcube-1.6.19+dfsg/program/lib/Roundcube/rcube_imap_generic.ph=
p roundcube-1.6.20+dfsg/program/lib/Roundcube/rcube_imap_generic.php
--- roundcube-1.6.19+dfsg/program/lib/Roundcube/rcube_imap_generic.php 2026=
-09-06 10:27:09.000000000 +0200
+++ roundcube-1.6.20+dfsg/program/lib/Roundcube/rcube_imap_generic.php 2026=
-10-19 08:49:43.000000000 +0200
@@ -2353,6 +2353,10 @@
$flag =3D $this->flags[strtoupper($flag)];
}
=20
+ if (preg_match('/[\x00-\x20\x7f(){"*%]/', $flag)) {
+ return false;
+ }
+
// if PERMANENTFLAGS is not specified all flags are allowed
if (!empty($this->data['PERMANENTFLAGS'])
&& !in_array($flag, (array) $this->data['PERMANENTFLAGS'])
diff -Nru roundcube-1.6.19+dfsg/program/lib/Roundcube/rcube_mime.php roundc=
ube-1.6.20+dfsg/program/lib/Roundcube/rcube_mime.php
--- roundcube-1.6.19+dfsg/program/lib/Roundcube/rcube_mime.php 2026-09-06 1=
0:27:09.000000000 +0200
+++ roundcube-1.6.20+dfsg/program/lib/Roundcube/rcube_mime.php 2026-10-19 0=
8:49:43.000000000 +0200
@@ -117,7 +117,8 @@
$out[$j] =3D $address;
}
else {
- $name =3D trim($val['name']);
+ // Remove any control characters for security reasons
+ $name =3D trim(preg_replace('/[\x00-\x1F]+/', ' ', $val['n=
ame']));
$string =3D '';
=20
if ($name && $address && $name !=3D $address) {
diff -Nru roundcube-1.6.19+dfsg/program/lib/Roundcube/rcube_session.php rou=
ndcube-1.6.20+dfsg/program/lib/Roundcube/rcube_session.php
--- roundcube-1.6.19+dfsg/program/lib/Roundcube/rcube_session.php 2026-09-0=
6 10:27:09.000000000 +0200
+++ roundcube-1.6.20+dfsg/program/lib/Roundcube/rcube_session.php 2026-10-1=
9 08:49:43.000000000 +0200
@@ -520,11 +520,7 @@
break 2;
=20
if ($str[$p] =3D=3D '!') {
- $p++;
- $has_value =3D false;
- }
- else {
- $has_value =3D true;
+ throw new Exception('Unsupported value');
}
=20
$name =3D substr($str, $p, $q - $p);
@@ -532,7 +528,8 @@
=20
$serialized .=3D 's:' . strlen($name) . ':"' . $name . '";';
=20
- if ($has_value) {
+ // @phpstan-ignore-next-line
+ if (true) {
for (;;) {
$p =3D $q;
switch (strtolower($str[$q])) {
diff -Nru roundcube-1.6.19+dfsg/program/lib/Roundcube/rcube_user.php roundc=
ube-1.6.20+dfsg/program/lib/Roundcube/rcube_user.php
--- roundcube-1.6.19+dfsg/program/lib/Roundcube/rcube_user.php 2026-09-06 1=
0:27:09.000000000 +0200
+++ roundcube-1.6.20+dfsg/program/lib/Roundcube/rcube_user.php 2026-10-19 0=
8:49:43.000000000 +0200
@@ -600,8 +600,8 @@
$sql_result =3D $dbh->limitquery("SELECT u.*"
. " FROM " . $dbh->table_name('users', true) . " u"
. " JOIN " . $dbh->table_name('identities', true) . " i ON=
(i.`user_id` =3D u.`user_id`)"
- . " WHERE `email` =3D ? AND `del` <> 1",
- 0, 1, $user
+ . " WHERE u.`mail_host` =3D ? AND i.`email` =3D ? AND i.`d=
el` <> 1",
+ 0, 1, $host, $user
);
=20
$sql_arr =3D $dbh->fetch_assoc($sql_result);
diff -Nru roundcube-1.6.19+dfsg/program/lib/Roundcube/rcube_utils.php round=
cube-1.6.20+dfsg/program/lib/Roundcube/rcube_utils.php
--- roundcube-1.6.19+dfsg/program/lib/Roundcube/rcube_utils.php 2026-09-06 =
10:27:09.000000000 +0200
+++ roundcube-1.6.20+dfsg/program/lib/Roundcube/rcube_utils.php 2026-10-19 =
08:49:43.000000000 +0200
@@ -464,9 +464,12 @@
'169.254.0.0/16', // link-local / cloud metadata
'100.64.0.0/10', // RFC6598: Shared Address Space (ca=
rrier-grade NAT)
'::1/128',
+ '::/128',
'fc00::/7',
'fe80::/10', // IPv6 link-local
'::ffff:0:0/96', // RFC5156
+ '64:ff9b::/96', // RFC 6052 NAT64 (maps IPv4 incl. p=
rivate ranges into IPv6)
+ '64:ff9b:1::/48' // (RFC 8215 local-use NAT64)=20
];
=20
foreach ($nets as $net) {
@@ -568,9 +571,10 @@
if ($container_id || $prefix) {
// Exclude rcube_string_replacer pattern matches, this is need=
ed
// for cases like @media { body { position: fixed; } } (#5811)
- $excl =3D '(?!' . substr($replacements->pattern, 1, -1) . =
')';
- $regexp =3D '/(^\s*|,\s*|\}\s*|\{\s*)(' . $excl . ':?[a-z0-9=
\._#\*\[][a-z0-9\._:\(\)#=3D~ \[\]"\|\>\+\$\^-]*)/im';
- $callback =3D function($matches) use ($container_id, $prefix) {
+ $excl =3D '(?!' . substr($replacements->pattern, 1, -1) . ')';
+ $regexp =3D '/(^\s*|,\s*|\}\s*|\{\s*|@[^;{]*[;{]\s*)'
+ . '(' . $excl . ':?[a-z0-9\._#\*\[:][a-z0-9\._:\(\)#=3D~ \=
[\]"\|\>\+\$\^-]*)/im';
+ $callback =3D function ($matches) use ($container_id, $prefix)=
{
$replace =3D $matches[2];
=20
if (stripos($replace, ':root') =3D=3D=3D 0) {
diff -Nru roundcube-1.6.19+dfsg/program/lib/Roundcube/rcube_washtml.php rou=
ndcube-1.6.20+dfsg/program/lib/Roundcube/rcube_washtml.php
--- roundcube-1.6.19+dfsg/program/lib/Roundcube/rcube_washtml.php 2026-09-0=
6 10:27:09.000000000 +0200
+++ roundcube-1.6.20+dfsg/program/lib/Roundcube/rcube_washtml.php 2026-10-1=
9 08:49:43.000000000 +0200
@@ -52,7 +52,13 @@
*/
class rcube_washtml
{
- public const CSS_URL_REGEXP =3D '/(u|\\\0*75|\\\0*55)(r|\\\0*72|\\\0*5=
2)(l|\\\0*6C|\\\0*4C)\(/i';
+ /**
+ * Matches the CSS url() token in text that has been normalised by
+ * self::css_unescape(). Kept simple on purpose: every escaped spellin=
g is
+ * resolved before this pattern is applied, so it never has to enumera=
te
+ * escape variants.
+ */
+ public const CSS_URL_REGEXP =3D '/(u)(r)(l)\(/i';
=20
/**
* @var array Allowed HTML elements (default)
@@ -310,7 +316,7 @@
$out =3D null;
=20
// in SVG to/from attribs may contain anything, including =
URIs
- if ($key =3D=3D 'to' || $key =3D=3D 'from' || $key =3D=3D =
'values') {
+ if ($key =3D=3D 'to' || $key =3D=3D 'from' || $key =3D=3D =
'values' || $key =3D=3D 'by') {
$key =3D strtolower((string) $node->getAttribute('attr=
ibuteName'));
$key =3D trim(preg_replace('/^.*:/', '', $key));
if ($key && !isset($this->_html_attribs[$key])) {
@@ -325,6 +331,9 @@
$out =3D $this->wash_link($value);
}
else if ($this->is_funciri_attribute($node->nodeName, $key=
)) {
+ // Resolve CSS escapes before looking for the url() to=
ken, so
+ // that no spelling of it has to be enumerated (#10325)
+ $value =3D self::css_unescape($value);
if (preg_match(self::CSS_URL_REGEXP, $value, $m)) {
$value =3D preg_replace(self::CSS_URL_REGEXP, 'url=
(', $value);
if (preg_match('/^([a-z:]*url)\(\s*[\'"]?([^\'"\)]=
*)[\'"]?\s*\)?/iu', $value, $match)) {
@@ -560,8 +569,64 @@
}
=20
$rx =3D '/^(mask|cursor|fill|filter|stroke|clip-path|marker-start|=
marker-end|marker-mid)$/i';
- return self::attribute_value($node, 'attributeName', $rx)
- && self::attribute_value($node, 'values', self::CSS_URL_REGEXP=
);
+
+ if (!self::attribute_value($node, 'attributeName', $rx)) {
+ return false;
+ }
+
+ // SMIL takes its value from any of these attributes, so all of th=
em have
+ // to be inspected, not just 'values'
+ foreach (['values', 'to', 'from', 'by'] as $attrib) {
+ $value =3D $node->getAttribute($attrib);
+ if ($value !=3D=3D '' && preg_match(self::CSS_URL_REGEXP, self=
::css_unescape($value))) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Resolve CSS escape sequences so that a value can be matched against=
a
+ * plain pattern.
+ *
+ * CSS Syntax Level 3 (4.3.7) defines two escape forms: a backslash fo=
llowed
+ * by one to six hex digits, optionally terminated by a single whitesp=
ace
+ * character, and a backslash followed by any other character, which s=
tands
+ * for that character literally. Both are resolved here, so "u\72 l(",
+ * "\000075rl(" and "u\rl(" all reduce to "url(".
+ *
+ * Resolving first and matching afterwards means the caller does not h=
ave to
+ * enumerate spellings, which is what previously allowed new variants =
to slip
+ * through one at a time.
+ *
+ * @param string $value CSS text
+ *
+ * @return string Text with escape sequences resolved
+ */
+ public static function css_unescape($value)
+ {
+ if (strpos((string) $value, '\\') =3D=3D=3D false) {
+ return (string) $value;
+ }
+
+ return preg_replace_callback(
+ '/\\\(?:([0-9a-fA-F]{1,6})[ \t\n\r\f]?|([^\n\r\f]))/',
+ static function ($m) {
+ if ($m[1] !=3D=3D '') {
+ $cp =3D hexdec($m[1]);
+ // Null, out-of-range and surrogate code points become=
U+FFFD
+ if ($cp =3D=3D=3D 0 || $cp > 0x10FFFF || ($cp >=3D 0xD=
800 && $cp <=3D 0xDFFF)) {
+ return "\u{FFFD}";
+ }
+
+ return mb_chr($cp, 'UTF-8');
+ }
+
+ return $m[2];
+ },
+ (string) $value
+ );
}
=20
/**
diff -Nru roundcube-1.6.19+dfsg/public_html/plugins/markasjunk/markasjunk.p=
hp roundcube-1.6.20+dfsg/public_html/plugins/markasjunk/markasjunk.php
--- roundcube-1.6.19+dfsg/public_html/plugins/markasjunk/markasjunk.php 202=
6-09-06 10:27:09.000000000 +0200
+++ roundcube-1.6.20+dfsg/public_html/plugins/markasjunk/markasjunk.php 202=
6-10-19 08:49:43.000000000 +0200
@@ -140,7 +140,7 @@
$is_spam =3D $this->rcube->action =3D=3D 'plugin.markasjunk.jun=
k';
$uids =3D rcube_utils::get_input_value('_uid', rcube_utils::=
INPUT_POST);
$mbox_name =3D rcube_utils::get_input_string('_mbox', rcube_utils=
::INPUT_POST);
- $messageset =3D rcmail::get_uids($uids, $mbox_name, $multifolder);
+ $messageset =3D rcmail::get_uids($uids, $mbox_name, $multifolder, =
rcube_utils::INPUT_POST);
$dest_mbox =3D $is_spam ? $this->spam_mbox : $this->ham_mbox;
=20
// special case when select all is used, uid is '*', and not in mu=
lti folder mode and we are using a driver
diff -Nru roundcube-1.6.19+dfsg/public_html/plugins/password/drivers/direct=
admin.php roundcube-1.6.20+dfsg/public_html/plugins/password/drivers/direct=
admin.php
--- roundcube-1.6.19+dfsg/public_html/plugins/password/drivers/directadmin.=
php 2026-09-06 10:27:09.000000000 +0200
+++ roundcube-1.6.20+dfsg/public_html/plugins/password/drivers/directadmin.=
php 2026-10-19 08:49:43.000000000 +0200
@@ -60,7 +60,7 @@
}
=20
if (isset($response['error']) && $response['error'] =3D=3D 1) {
- return ['code' =3D> PASSWORD_ERROR, 'message' =3D> strip_tags(=
$response['text'])];
+ return ['code' =3D> PASSWORD_ERROR, 'message' =3D> $response['=
text']];
}
=20
return PASSWORD_SUCCESS;
diff -Nru roundcube-1.6.19+dfsg/public_html/plugins/password/drivers/modobo=
a.php roundcube-1.6.20+dfsg/public_html/plugins/password/drivers/modoboa.php
--- roundcube-1.6.19+dfsg/public_html/plugins/password/drivers/modoboa.php =
2026-09-06 10:27:09.000000000 +0200
+++ roundcube-1.6.20+dfsg/public_html/plugins/password/drivers/modoboa.php =
2026-10-19 08:49:43.000000000 +0200
@@ -82,20 +82,35 @@
}
=20
// Get user ID (pk)
- $userid =3D $decoded[0]->pk;
+ $userid =3D null;
+ $user =3D null;
+ foreach ($decoded as $account) {
+ if (isset($account->username) && $account->username =3D=3D=3D =
$username) {
+ $userid =3D $account->pk;
+ $user =3D [
+ 'username' =3D> $account->username,
+ 'mailbox' =3D> $account->mailbox,
+ 'role' =3D> $account->role,
+ ];
+ break;
+ }
+ }
+
+ if ($user =3D=3D=3D null) {
+ return PASSWORD_CONNECT_ERROR;
+ }
=20
// Encode json with new password
- $ret['username'] =3D $decoded[0]->username;
- $ret['mailbox'] =3D $decoded[0]->mailbox;
- $ret['role'] =3D $decoded[0]->role;
- $ret['password'] =3D $passwd; // new password
- $encoded =3D json_encode($ret);
+ $user['password'] =3D $passwd;
+ $encoded =3D json_encode($user);
+
+ $url =3D "https://{$host}/api/v1/accounts/{$userid}/";
=20
// Call HTTP API Modoboa
$curl =3D curl_init();
=20
curl_setopt_array($curl, [
- CURLOPT_URL =3D> "https://" . $host . "/api/v1/acco=
unts/" . $userid . "/",
+ CURLOPT_URL =3D> "https://{$host}/api/v1/accounts/{=
$userid}/",
CURLOPT_RETURNTRANSFER =3D> true,
CURLOPT_ENCODING =3D> "",
CURLOPT_MAXREDIRS =3D> 10,
diff -Nru roundcube-1.6.19+dfsg/public_html/plugins/password/password.php r=
oundcube-1.6.20+dfsg/public_html/plugins/password/password.php
--- roundcube-1.6.19+dfsg/public_html/plugins/password/password.php 2026-09=
-06 10:27:09.000000000 +0200
+++ roundcube-1.6.20+dfsg/public_html/plugins/password/password.php 2026-10=
-19 08:49:43.000000000 +0200
@@ -425,7 +425,7 @@
}
=20
if ($message) {
- $reason .=3D ' ' . $message;
+ $reason .=3D ' ' . rcube::Q($message, 'strict', false);
}
=20
return $reason;
diff -Nru roundcube-1.6.19+dfsg/public_html/plugins/squirrelmail_usercopy/s=
quirrelmail_usercopy.php roundcube-1.6.20+dfsg/public_html/plugins/squirrel=
mail_usercopy/squirrelmail_usercopy.php
--- roundcube-1.6.19+dfsg/public_html/plugins/squirrelmail_usercopy/squirre=
lmail_usercopy.php 2026-09-06 10:27:09.000000000 +0200
+++ roundcube-1.6.20+dfsg/public_html/plugins/squirrelmail_usercopy/squirre=
lmail_usercopy.php 2026-10-19 08:49:43.000000000 +0200
@@ -170,7 +170,10 @@
$rcmail =3D rcmail::get_instance();
=20
/**** File based backend ****/
- if ($rcmail->config->get('squirrelmail_driver') =3D=3D 'file' && (=
$srcdir =3D $rcmail->config->get('squirrelmail_data_dir'))) {
+ if ($rcmail->config->get('squirrelmail_driver') =3D=3D 'file'
+ && ($srcdir =3D $rcmail->config->get('squirrelmail_data_dir'))
+ && strpos($uname, '/') =3D=3D=3D false // security check
+ ) {
if (($hash_level =3D $rcmail->config->get('squirrelmail_data_d=
ir_hash_level')) > 0) {
$srcdir =3D slashify($srcdir).chunk_split(substr(base_conv=
ert(crc32($uname), 10, 16), 0, $hash_level), 1, '/');
}
diff -Nru roundcube-1.6.19+dfsg/tests/Framework/Mime.php roundcube-1.6.20+d=
fsg/tests/Framework/Mime.php
--- roundcube-1.6.19+dfsg/tests/Framework/Mime.php 2026-09-06 10:27:09.0000=
00000 +0200
+++ roundcube-1.6.20+dfsg/tests/Framework/Mime.php 2026-10-19 08:49:43.0000=
00000 +0200
@@ -136,6 +136,21 @@
}
=20
/**
+ * Test sanitization of decoded header values
+ * Uses rcube_mime::decode_address_list()
+ */
+ public function test_decode_address_list_sanitization()
+ {
+ $content =3D "Attacker\r\nX-Injected-By: test\r\nX-Pad: p";
+ $input =3D '=3D?UTF-8?B?' . base64_encode($content) . '?=3D <victi=
m@example.com>';
+ $result =3D \rcube_mime::decode_address_list($input);
+
+ $content =3D str_replace("\r\n", ' ', $content);
+ $this->assertSame($content, $result[1]['name']);
+ $this->assertSame("\"{$content}\" <victim@example.com>", $result[1=
]['string']);
+ }
+
+ /**
* Test decoding of header values
* Uses rcube_mime::decode_mime_string()
*/
diff -Nru roundcube-1.6.19+dfsg/tests/Framework/Utils.php roundcube-1.6.20+=
dfsg/tests/Framework/Utils.php
--- roundcube-1.6.19+dfsg/tests/Framework/Utils.php 2026-09-06 10:27:09.000=
000000 +0200
+++ roundcube-1.6.20+dfsg/tests/Framework/Utils.php 2026-10-19 08:49:43.000=
000000 +0200
@@ -321,6 +321,23 @@
$this->assertSame('#rcmbody * { background-color: silver; }', $mod=
);
$mod =3D \rcube_utils::mod_css_styles('//* test */* {background-co=
lor: silver;}', '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);
+ $this->assertSame('@layer a; #rcmbody div { display: none; }', $mo=
d);
+ $style =3D '@layer a, b; div { display: none; }';
+ $mod =3D \rcube_utils::mod_css_styles($style, 'rcmbody', true);
+ $this->assertSame('@layer a, b; #rcmbody div { display: none; }', =
$mod);
+ $style =3D '@layer a { div { display: none; } }';
+ $mod =3D \rcube_utils::mod_css_styles($style, 'rcmbody', true);
+ $this->assertSame('@layer a { #rcmbody div { display: none; } }', =
$mod);
+ $style =3D '@media screen { @layer a; div { display: none; } }';
+ $mod =3D \rcube_utils::mod_css_styles($style, 'rcmbody', true);
+ $this->assertSame('@media screen { @layer a; #rcmbody div { displa=
y: none; } }', $mod);
+ $style =3D '::before { color: red; }';
+ $mod =3D \rcube_utils::mod_css_styles($style, 'rcmbody', true);
+ $this->assertSame('#rcmbody ::before { color: red; }', $mod);
}
=20
/**
@@ -611,6 +628,11 @@
['http://[::ffff:7f00:1]/', true],
['http://[0:0:0:0:0:ffff:7f00:1]/', true],
['http://[::ffff:a9fe:a9fe]/', true],
+ ['http://[::]/', true],
+ ['http://[64:ff9b::]/', true],
+ ['http://[64:ff9b:1::]/', true],
+ ['http://[64:ff9b::a9fe:a9fe]/', true],
+ ['http://[64:ff9b::7f00:1]/', true],
// Non-local hosts
['http://[2001:470::76:0:0:0:2]', false],
['http://domain.tld', false],
diff -Nru roundcube-1.6.19+dfsg/tests/Framework/Washtml.php roundcube-1.6.2=
0+dfsg/tests/Framework/Washtml.php
--- roundcube-1.6.19+dfsg/tests/Framework/Washtml.php 2026-09-06 10:27:09.0=
00000000 +0200
+++ roundcube-1.6.20+dfsg/tests/Framework/Washtml.php 2026-10-19 08:49:43.0=
00000000 +0200
@@ -565,6 +565,55 @@
'<svg><image><set attributeName=3D"src" to=3D"http://attac=
ker.example/d"/></image></svg>',
'<svg><image><set attributeName=3D"src" x-washed=3D"to" />=
</image></svg>',
],
+ [
+ '<svg><image><animate attributeName=3D"src" by=3D"http://a=
ttacker.example/a"/></image></svg>',
+ '<svg><image><animate attributeName=3D"src" x-washed=3D"by=
" /></image></svg>',
+ ],
+ [
+ '<svg><image><animate attributeName=3D"fill" by=3D"url(htt=
p://attacker.example/a)"/></image></svg>',
+ '<svg><image><!-- animate blocked --></image></svg>',
+ ],
+ [
+ // FuncIRI smuggled through 'by' on a presentation attribu=
te
+ '<svg><rect><animate attributeName=3D"fill" by=3D"url(http=
://attacker.example/f)" dur=3D"1s"/></rect></svg>',
+ '<svg><rect><!-- animate blocked --></rect></svg>',
+ ],
+
+ [
+ // FuncIRI smuggled through 'from'
+ '<svg><rect><animate attributeName=3D"fill" from=3D"url(ht=
tp://attacker.example/g)" dur=3D"1s"/></rect></svg>',
+ '<svg><rect><!-- animate blocked --></rect></svg>',
+ ],
+ [
+ // Hex escape terminated by a space (CSS Syntax L3, 4.3.7)
+ '<svg><rect fill=3D"u\72 l(http://attacker.example/h)"/></=
svg>',
+ '<svg><rect x-washed=3D"fill" /></svg>',
+ ],
+ [
+ // Zero-padded hex escape
+ '<svg><rect fill=3D"\000075rl(http://attacker.example/i)"/=
></svg>',
+ '<svg><rect x-washed=3D"fill" /></svg>',
+ ],
+ [
+ // Literal escape: backslash before a non-hex character
+ '<svg><rect fill=3D"u\rl(http://attacker.example/j)"/></sv=
g>',
+ '<svg><rect x-washed=3D"fill" /></svg>',
+ ],
+ [
+ // Several literal escapes combined
+ '<svg><rect fill=3D"\u\r\l(http://attacker.example/k)"/></=
svg>',
+ '<svg><rect x-washed=3D"fill" /></svg>',
+ ],
+ [
+ // Escaped url() smuggled through a SMIL 'by' attribute
+ '<svg><rect><animate attributeName=3D"fill" by=3D"u\rl(htt=
p://attacker.example/l)" dur=3D"1s"/></rect></svg>',
+ '<svg><rect><!-- animate blocked --></rect></svg>',
+ ],
+ [
+ // An escape that does NOT spell url() must not be over-bl=
ocked
+ '<svg><rect fill=3D"\23 ff0000"/></svg>',
+ '<svg><rect fill=3D"#ff0000" /></svg>',
+ ],
];
}
=20
diff -Nru roundcube-1.6.19+dfsg/tests/Rcmail/Sendmail.php roundcube-1.6.20+=
dfsg/tests/Rcmail/Sendmail.php
--- roundcube-1.6.19+dfsg/tests/Rcmail/Sendmail.php 2026-09-06 10:27:09.000=
000000 +0200
+++ roundcube-1.6.20+dfsg/tests/Rcmail/Sendmail.php 2026-10-19 08:49:43.000=
000000 +0200
@@ -91,7 +91,25 @@
*/
function test_extract_inline_images()
{
- $this->markTestIncomplete();
+ $message =3D new \Mail_mime("\r\n");
+ $message->setHTMLBody('<body></body>');
+ \rcmail_sendmail::extract_inline_images($message, 'test@test.com');
+ $this->assertSame('<body></body>', $message->getMessageBody());
+
+ $message =3D new \Mail_mime("\r\n");
+ $ctype =3D "test/test\r\nX-Inject:test";
+ $b64 =3D base64_encode(file_get_contents(__DIR__ . '/../src/logo.j=
pg'));
+ $message->setHTMLBody('<body><img title=3D"" src=3D"data:' . $ctyp=
e . ';base64,' . $b64 . '"></body>');
+ \rcmail_sendmail::extract_inline_images($message, 'test@test.com');
+
+ $body =3D $message->getMessageBody();
+ $this->assertStringContainsString('Content-Type: image/jpeg', $bod=
y);
+ $this->assertStringContainsString('Content-Disposition: inline', $=
body);
+ $this->assertStringContainsString('size=3D10549', $body);
+ $this->assertStringContainsString(substr($b64, 0, 32), $body);
+ $this->assertMatchesRegularExpression('/name=3D[a-f0-9]+\.jpeg/', =
$body);
+ $this->assertMatchesRegularExpression('/<img title=3D3D"" src=3D3D=
"cid:[a-f0-9]+@test\.com"/', $body);
+ $this->assertMatchesRegularExpression('/Content-ID: <[a-f0-9]+@tes=
t\.com>/', $body);
}
=20
/**
Binary files /tmp/BuR1VjgKj9/roundcube-1.6.19+dfsg/tests/src/logo.jpg and /=
tmp/0VrCIaFpiI/roundcube-1.6.20+dfsg/tests/src/logo.jpg differ
--TfsI180ySPTrCE+u--
--lG/i1JgFdfSaYiDE
Content-Type: application/pgp-signature; name=signature.asc
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEERpy6p3b9sfzUdbME05pJnDwhpVIFAmrYNxkACgkQ05pJnDwh
pVJYbRAAlzi6x1PzlwkpaYbtn09qcZ6s0q4St+t2RLOiIIAkXkaSIa9pH/AQugh/
1zx2PN3Cg3rns8Fn8utqucKOWdrVF6465G/KWIikJl9BV5okUwW7XmTOAL3nYddk
6EHuBeNVsReMaALjUeZ5thLuKdqFSUwWKxuKLI8bEGTxwe87Ptay1s5UPIKSrPP6
oyvyJ52g3KfFhOFHh3XnhjdGv5dCpnESUYOXQckKzOv+azyWrijhqa7E6p1Knuhl
y+AwXrmkrlZnOtCrw1V9Ahi+olBW41gRRfHGyOuz+CHt5iXTSsagbqh5ZQ1mAXxw
cXgbDfd60mIlaVPLLM1yDdcicgZtSX5N9aaRmBXxRgqDs6Ib+URxU1QwS+2NgTuj
/h2lVfUk/gCJHjpMbiGIbIZanofkaMppCBhCfZeKIJatgH69gqadu49SvJzebIfC
POFa/OBjgFdKVe1Uevz+OyPniRYmPYI8n1cAucje2PDyiy0Q5u7prjENpGHu8Bpk
uneDGJpVU/8ub4E59aX/Tc5aaddVodTaB8WI+EI1aDF83wmn7lfQrtwDq8PI1jDk
0HHgwo/+34BSnHG4G5VwzwQj6EV8/+9MhHE/5+p6deCrysSl50FV2F3GSqmlg1XS
JnWIfO5c+dJ8egV92O+8GKtigKyZcKDeePmwKR1ZQLyGCGd14Kw=
=WbQk
-----END PGP SIGNATURE-----
--lG/i1JgFdfSaYiDE--
Technical Details
Message-ID:
<NQvEB-6U2j-9@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!fu-berlin.de!bofh.it!news.nic.it!robomodReferences:
<NPWxb-6y8Q-5@gated-at.bofh.it> <NQvEB-6U2j-3@gated-at.bofh.it> <NPWxb-6y8Q-5@gated-at.bofh.it> <NQvEB-6U2j-3@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!fu-berlin.de!bofh.it!news.nic.it!robomod From: Guilhem Moulin <guilhem@debian.org> Newsgroups: linux.debian.bugs.dist Subject: Bug#1151279: roundcube: Multiple security vulnerabilities Date: Wed, 21 Oct 2026 06:00:01 +0200 Message-ID: <NQvEB-6U2j-9@gated-at.bofh.it> References: <NPWxb-6y8Q-5@gated-at.bofh.it> <NQvEB-6U2j-3@gated-at.bofh.it> <NPWxb-6y8Q-5@gated-at.bofh.it> <NQvEB-6U2j-3@gated-at.bofh.it> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Wed Oct 21 03:55:11 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -0.458 Reply-To: Guilhem Moulin <guilhem@debian.org>, 1151279@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 1151279 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="lG/i1JgFdfSaYiDE" Content-Disposition: inline X-Debian-User: guilhem X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/1997844 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 2132 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: 1151279@bugs.debian.org X-Original-Date: Wed, 21 Oct 2026 05:52:57 +0200 X-Original-Message-ID: <atg3GYaeIbUBBd8t@debian.org> X-Original-References: <atYnjekb7SLlHkaU@debian.org> <atg2Y0vEsHtUdbs-@debian.org> <atYnjekb7SLlHkaU@debian.org> <atg2Y0vEsHtUdbs-@debian.org>