On this page (8 sections)
Ubuntu has published USN-9050-1, a security notice covering three web application flaws in DAViCal, the open source CalDAV and CardDAV server. The issues are a reflected cross-site scripting (XSS) bug, a cross-site request forgery (CSRF) bug and a stored XSS bug. The CVE records were published in December 2019 and describe DAViCal through version 1.1.8.
If you run DAViCal for shared calendars or contacts, especially on Ubuntu and with an administrator who logs in through the web interface, this notice is worth a few minutes of your time. The main risk is that a logged-in administrator can be tricked into actions that create a new admin account.
What the notice covers
According to the Ubuntu notice, DAViCal did not properly encode certain request parameters, did not protect against cross-site request forgery, and did not properly sanitize certain user account fields. Each maps to one CVE:
- CVE-2019-18345: reflected XSS. The application echoes the action parameter without encoding, so a crafted link can run script in the victim's browser session.
- CVE-2019-18346: CSRF. If an authenticated user visits an attacker-controlled page, the attacker can send requests to DAViCal in that user's name.
- CVE-2019-18347: stored XSS. Fields that unprivileged users can set (Username, Display Name and Email) are not sanitized on output, so stored JavaScript can run when another, possibly privileged, user views them.
The CVE records describe the same worst case for the first two: if the victim is an administrator, the attacker can, for example, add a new admin user and gain full access to the application. For the stored XSS, Ubuntu notes that an authenticated user could execute script in another user's browser, including an administrator's.
Why these weakness classes matter
XSS and CSRF both abuse the trust a browser and a web application place in each other. With XSS, the application hands attacker-controlled text back to a user as if it were its own page, so the script runs with that user's permissions. With CSRF, the application accepts a state-changing request just because the browser attached a valid session cookie, without checking that the user meant to send it.
Neither flaw needs the attacker to break a password. They need a user to click a link or visit a page while logged in. That is why an admin account that stays signed in to DAViCal in the same browser used for everyday browsing is the realistic exposure.
Severity: sources disagree
The scores differ depending on where you look. The CVE records list CVSS 9.3 for CVE-2019-18345, 8.8 for CVE-2019-18346 and 5.4 for CVE-2019-18347. The GitHub Advisory Database, by contrast, labels the reflected XSS Moderate, the CSRF Moderate and the stored XSS Low, and notes the entries are unreviewed. Treat the numbers as a rough guide and judge risk by your own setup: who can log in, who has admin rights, and whether the interface is reachable from the internet.
- CVSS for CVE-2019-18345 (reflected XSS)
- 9.3
- CVSS for CVE-2019-18346 (CSRF)
- 8.8
- CVSS for CVE-2019-18347 (stored XSS)
- 5.4
Who is affected
The CVE records state the flaws affect DAViCal through 1.1.8. The research does not list the Ubuntu releases or fixed package versions covered by USN-9050-1, so check the notice itself for those. The GitHub advisories list no affected or patched package versions. Installations at greater risk are those where:
- The DAViCal admin interface is reachable from the internet or a large internal network.
- Several people have accounts, since any user can set the fields involved in the stored XSS.
- Administrators stay logged in while browsing other sites or reading email links.
How to check your exposure
First find out which DAViCal version you run. On Ubuntu or Debian, this read-only query shows the installed and candidate package version if you installed DAViCal from the distribution repositories. A result saying the package is not installed suggests a manual install.
apt policy davicalCompare the result with the fixed version listed in the Ubuntu notice for your release. If you installed from source, check your version against the release notes in the project ChangeLog.
Also review your user list for accounts you do not recognize, particularly administrators, and for unusual characters or markup in usernames, display names and email fields, which is where stored script would sit.
What to do now
- Identify every DAViCal instance you run and its version.
- Apply the Ubuntu update from USN-9050-1 if you use the distribution package, or upgrade to a release newer than 1.1.8 if you install from source. The DAViCal wiki lists 1.1.13 as the current stable release.
- Review all user accounts, especially administrators, and remove any you cannot explain.
- Inspect Username, Display Name and Email values for embedded markup or script and clean them up.
- Ask administrators to log out of DAViCal when finished and avoid browsing other sites in the same session.
- Restrict access to the DAViCal web interface to trusted networks or a VPN where possible.
- Consider rotating administrator passwords if you find anything suspicious.
On Ubuntu, upgrading the DAViCal package brings in the fix. The command below updates only that package. Review the notice first and take a backup of your DAViCal database before upgrading.
sudo apt update && sudo apt install --only-upgrade davicalDetection and monitoring afterwards
Web server logs are a useful place to look for attempts against the reflected XSS. This read-only search lists access log lines where the action parameter contains a literal or URL-encoded angle bracket. Adjust the log path to your server (the path shown is the Apache default on Debian/Ubuntu); expect some false positives and note that it will not catch every encoding.
grep -iE 'action=[^ &]*(%3C|<)' /var/log/apache2/access.logBeyond logs, watch for new administrator accounts appearing in DAViCal, and keep the web interface behind HTTPS. A free security headers check can show whether your server sends headers such as Content-Security-Policy, which can limit the damage script injection does. See also security headers explained.
Putting a web application firewall in front of an admin interface can add a further layer, though it is no substitute for patching. Our guide on what a WAF is explains what it does and does not cover.
Background and timeline
- December 4, 2019: CVE-2019-18346 and CVE-2019-18347 published by NVD.
- December 12, 2019: CVE-2019-18345 published by NVD.
- May 24, 2022: the three entries added to the GitHub Advisory Database.
- November 11, 2026: Ubuntu publishes USN-9050-1 (date as given on the notice page).
Debian also issued DSA-4582 for these issues back in 2019, which is listed among the references for all three CVEs. For more security notices and analysis, browse the Webforta security blog.
Sources
This article is based on the public sources below. Details can change as vendors and researchers publish more; check the original advisories before acting on version numbers.
