Hide the XWiki Version

Last modified by Eleni Cojocariu on 2026/12/04 16:09

Replace the XWiki version the footer shows, and stop the wiki reporting it over REST, so an attacker gets no version to look vulnerabilities up with.

Steps

Every page of a wiki prints the exact XWiki version in its footer, which hands any reader a shortlist of published vulnerabilities to try against the instance, one of the openings Attack Vectors describes.

Information

Nothing below makes the version unobtainable. Every page loads scripts and stylesheets from addresses that carry the version of the extension they belong to, and for the extensions XWiki bundles that is the XWiki version; anyone can read them in the page source, and neither step changes them. What follows removes the version from the two places that state it outright. Keeping the instance upgraded is what removes the vulnerabilities.

  1. Change what the footer shows. Open the drawer, choose "Administer Wiki", then the "Look & Feel" category and its "Presentation" section. Fill the "Version" field, under "Footer", with the text you want in place of the version, and save.

    The Footer group of the Presentation administration section, its Version field filled with a custom string

    The field exists in the wiki administration only, and the text replaces the whole footer entry: the product name and its link to the Administration Application disappear with the version, which matters because the address behind that link carries the version too.

  2. Stop the wiki from reporting the version itself, if a tidy footer is not what you are after. The field above changes nothing else, and the REST API answers any caller, signed in or not, with the real version. Create a version.properties file in the WEB-INF directory of the deployed web application, holding one line.
    version=Intranet Wiki

    Redeploying the web application removes the file again, so add it to whatever provisions the deployment. Restart the Servlet Container for the new value to be read.

    Warning

    XWiki reads this file wherever it reports its own version, so anything that compares the version it is running against another value sees your string rather than a number. Choose one and keep it stable.

  3. Reload any page and look at the footer, then ask the wiki what it runs.

    The footer of a wiki page showing a custom string where the version used to be

    curl -s https://wiki.example.org/xwiki/rest/

    The version element of the answer now holds the same string, and so does the XWiki-Version header on every REST response:

    <version>Intranet Wiki</version>

FAQ

I created version.properties and the footer still shows the real version. Why?

Because the footer entry is a link to the distribution's own extension page, and that address is built from the installed web application rather than from the file. Setting the administration field replaces the entry, link and all.

Where did version.properties go?

The distribution no longer ships one. XWiki still reads it when it is there and falls back to the version of the web application it runs from otherwise, which is why creating the file overrides what the wiki reports.

Related

Get Connected