On this page (7 sections)

Ubuntu has published security notice USN-9142-1 for Apache XML Security for Java, a library that Java applications use to work with XML signatures and encryption. According to the Ubuntu notice, the library incorrectly passed a configuration property when creating specific key elements, which could let an attacker possibly abuse an XPath Transform to extract sensitive information.

If you run Java applications that process signed XML (for example SAML single sign-on, web services or document signing), this is worth checking. The notice is short and many details are not given in the source we have, so this article separates what the notice states from general background and from what is unknown.

What the notice says

The Ubuntu notice describes a single problem. The library passed a configuration property incorrectly when it created certain key elements. An attacker could possibly use that to abuse an XPath Transform and extract sensitive information.

The word "possibly" matters. The notice does not describe a proven attack, does not say whether it can be triggered remotely, and, in the text we reviewed, gives no CVE identifier or severity score. Only one publisher covers this story so far, so treat the details as limited until the upstream Apache project or other sources add more.

Technical background in plain terms

This section is general background, not a statement from the notice. The notice does not describe the attack path in this detail.

XML signatures can include "transforms", which are processing steps applied to data before it is checked. An XPath Transform selects parts of a document using XPath expressions. In general, when an XML library is willing to fetch external resources such as local files or remote URLs while processing a signature, an attacker who controls the XML may be able to influence what the application reads or contacts. That is consistent with a class of weakness often called unsafe resource resolution, though the notice does not use that term.

What the notice does state is the change in behavior: after the update, file: and http: URIs are only dereferenced when the org.apache.xml.security.allowUnsafeResourceResolving property is set. In practice that means fetching those resources now requires the property to be set.

The notice does not state which files or data could be exposed, nor the exact code path. Do not assume more than the notice says, and do not assume less: any application that accepts XML from untrusted parties deserves attention.

Who may be exposed

The notice does not list affected packages, Ubuntu releases or usage scenarios, so the following is general guidance, not a statement of confirmed coverage.

  • Servers where a Java application depends on Apache XML Security for Java and processes XML signatures from outside parties, such as SAML or other federated login, signed API messages or document workflows.
  • Ubuntu systems that installed the library through the distribution package manager. Check the notice page for the releases and package versions it covers.
  • Applications that ship their own copy of the library inside a JAR file. Distribution package updates generally do not change files bundled inside an application, so the application vendor or your build process would need to update them.

Sites with no Java components, such as static sites or typical PHP and WordPress sites, would not normally be involved, unless something on the same server runs Java code that uses this library.

How to check your exposure

The notice text we reviewed does not list package names or fixed versions, so confirm them on the Ubuntu notice page for your release. The commands below are standard read-only queries.

This lists installed packages whose names mention xml-security, so you can see whether a matching package is present and which version (Debian/Ubuntu). Look for any matching line in the output.

List installed XML Security packages (Debian/Ubuntu)Shell
dpkg -l | grep -i xml-security

This searches common application directories for JAR files that may be bundled copies of the library. It only reads file names. Adjust the paths to where your applications live, and note that file names vary, so a miss is not proof of absence.

Find possible bundled copies of the library (run on the server)Shell
find /opt /srv /var/lib -name '*xmlsec*.jar' 2>/dev/null

This searches configuration and startup scripts for the property named in the notice, which tells you whether someone already enabled the opt-in behavior. Any hit deserves a review.

Search for the opt-in property (adjust paths)Shell
grep -R "allowUnsafeResourceResolving" /etc /opt /srv 2>/dev/null

What to do now

  1. Open the Ubuntu notice USN-9142-1 and find your Ubuntu release and the fixed package version.
  2. Run the package query above on each server to see whether the library is installed.
  3. Apply the update through your normal package manager, then restart the Java services that use the library so they load the new version.
  4. Search for bundled JAR copies and ask the application vendor, or rebuild with an updated dependency, where you find them.
  5. Search your configuration for org.apache.xml.security.allowUnsafeResourceResolving. Leave it unset unless a documented, trusted use case truly requires it.
  6. Review where your applications accept XML from untrusted sources and limit that input where you can.
  7. Check outbound network rules so application servers cannot reach internal services or arbitrary hosts unless needed.

This updates package lists and upgrades installed packages on Debian/Ubuntu. Run it in a maintenance window, since services may need a restart afterwards.

Caution. Restarting Java services interrupts requests in progress. Schedule the restart, and test single sign-on or signed-message flows afterwards, because the changed behavior may affect integrations that relied on fetching file: or http: resources.
Update packages (Debian/Ubuntu)Shell
sudo apt update && sudo apt upgrade

Detection and monitoring afterwards

Because the possible impact is information disclosure, look for signs that the application fetched resources it should not have. Review application logs for XML parsing errors or unusual file: and http: references, and watch outbound connections from application servers to unexpected hosts. Absence of evidence is not proof of safety, as the notice does not describe what traces an attempt would leave.

It also helps to keep an eye on the public side of your services. A security scan and certificate and DNS monitoring will not tell you whether this library is vulnerable, but they help you notice other changes on the systems that run it. For wider habits, see our guide to small business website security, and browse more security news.

What is still unknown

  • No CVE identifier or severity score appears in the source we reviewed.
  • Affected and fixed version numbers are not given in the notice text we reviewed.
  • The source does not say whether the issue has been exploited; exploitation status is unconfirmed.
  • Only one independent publisher covers this so far, so details may change as Apache or other sources publish more.

We will not guess at those values. Check the Ubuntu page and the Apache project for updates.

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.

  1. USN-9142-1: Apache XML Security for Java vulnerabilityubuntu.com ·
  • Ubuntu
  • Apache
  • Java
  • XML signature
  • USN