Security

Last modified by Eleni Cojocariu on 2026/12/04 14:24

The accounts, cookies, attack surface and published advisories an administrator has to know about when running an XWiki instance.

Explanation

A wiki is a server that invites people to write to it, which is what makes its security the administrator's business rather than only the system administrator's. Some of XWiki's features are there to protect the instance, and others, scripting above all, are useful precisely because they are powerful; running a wiki safely is mostly a matter of knowing which is which and of keeping the powerful ones in few hands.

Attack Vectors goes through what can actually be attempted against an instance, from the operating system underneath it down to a script in a reader's browser. The widest of those attacks is closed outside the wiki altogether, by hardening the server it runs on.

Inside the wiki, two mechanisms do most of the work, and both are configured in xwiki.properties: the HTML sanitizer, which keeps content the wiki does not trust from running JavaScript in a reader's browser, and the CSRF tokens, which keep another site from making that reader act without meaning to. Cookies lists what XWiki stores in the browser, which is the page to open when a privacy question or a browser policy needs an exact answer, and two further changes are worth making on any instance reachable from outside: Secure the Session Cookie, because whoever copies that cookie is logged in as its owner, and Hide the XWiki Version, which takes away one of the hints an attacker would otherwise read straight off the footer.

The Accounts an Installation Starts With

The Standalone (Demo) Distribution comes with an administration user, Admin, whose password is admin. It is there so the demo works out of the box, and changing that password is the first thing to do on an instance anyone else can reach (Install a Standalone (Demo) Distribution). Any other packaging ships no such user: the Distribution Wizard asks you for an administration account with a username and a password of your choice.

Every installation also has a superadmin account, which lives outside the database and cannot be modified from the wiki. It is the way back in when nothing else is: a forgotten administration password, rights that lock you out of your own wiki, an administration user deleted by mistake. Enable the Superadmin Account turns it on, and it is worth turning off again as soon as the repair is done.

Security Policy and Advisories

XWiki has a published Security Policy, which says how a vulnerability is reported, how it is handled and when it is disclosed.

A fixed vulnerability is published as a GitHub security advisory on the xwiki-platform repository, which is where it appears first, and is indexed afterwards by the vulnerability databases: NVD, cvedetails.com, vulners.com and vuldb.com, the last of which has to be searched for xwiki. Watching the repository is the way to hear about an advisory on the day it is published rather than when a database picks it up.

Writing scripts, macros or extensions raises a different set of questions, from escaping what a user typed to declaring the rights a page's own content needs. Those are answered in the Developer Guide's security documentation.

FAQ

Can the default Admin user be deleted?

Yes, once another account holds administration rights, but check first that Admin is not the author of a page you depend on. A page's scripts run with the rights of its author, and an author who no longer exists holds none, so deleting the user can quietly stop pages from working.

Can XWiki scan attachments for viruses?

Not on its own. The Antivirus Application, developed by a sponsoring company, scans the files attached to wiki pages; it is distributed on the XWiki store rather than on extensions.xwiki.org.

More

To find more about the current topic, you can search or use the table below and filter the columns to narrow your choices.

Related

Get Connected