CVE-2016-8739: Apache CXF JAX-RS XML External Entity Reference Vulnerability

org.apache.cxf:cxf-core Updated 02 Oct 2025

Summary

13/05/2022
Yes i
High
7.5

CVE-2016-8739: Improper Restriction of XML External Entity Reference in Apache CXF JAX-RS. Affects org.apache.cxf:cxf-core across 2 version ranges.

< 3.0.12 >= 3.1.0, < 3.1.9

Fixed in 3.0.12 or 3.1.9, depending on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Apache CXF is an open-source services framework that helps build and develop web services using standard protocols such as SOAP and REST. The JAX-RS module in Apache CXF provides support for building RESTful web services. The vulnerability identified as CVE-2016-8739 affects the JAX-RS module in Apache CXF versions prior to 3.0.12 and 3.1.x prior to 3.1.9. This vulnerability arises due to improper restriction of XML external entity references in the Apache CXF JAX-RS module. The module uses Apache Abdera Parser, which by default expands XML entities, leading to a significant XML External Entity (XXE) risk.

Vulnerability Detail

The vulnerability allows an attacker to exploit XML external entity references, which can result in various security risks. By leveraging this vulnerability, an attacker can read arbitrary files on the server, perform server-side request forgery (SSRF) attacks, or conduct denial-of-service (DoS) attacks. The improper handling of XML entities can lead to the disclosure of sensitive information, unauthorized access to internal resources, or the execution of arbitrary code. This vulnerability has a CVSS score of 7.5, indicating a high severity level.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 3.0.12 3.0.12
  • >= 3.1.0, < 3.1.9 3.1.9

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

If upgrading to a fixed version is not immediately feasible, a temporary workaround can be implemented by disabling the expansion of XML entities in the Apache CXF JAX-RS module. This can be achieved by modifying the configuration of the module to disable entity expansion. Here is an example of how to disable entity expansion in the Apache CXF JAX-RS module configuration:

<jaxrs:providers>
  <bean class="org.apache.cxf.jaxrs.provider.atom.AtomPojoProvider">
    <property name="expandEntityReferences" value="false"/>
</bean> ``` </jaxrs:providers> ```

Please note that this workaround may have implications on the functionality of the affected module, and upgrading to a fixed version is strongly recommended.

Conclusion

The Apache CXF JAX-RS XML External Entity Reference vulnerability (CVE-2016-8739) poses a significant risk to applications using affected versions of Apache CXF. It is crucial to upgrade to the fixed versions (3.0.12 or later for the 3.0.x branch, and 3.1.9 or later for the 3.1.x branch) to mitigate this vulnerability. If immediate upgrading is not possible, applying the provided workaround to disable entity expansion can help mitigate the risk temporarily. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.apache.cxf:cxf-core →

Share this vulnerability

FAQ

Apache CXF is an open-source services framework that helps build and develop web services using standard protocols such as SOAP and REST.

The JAX-RS module in Apache CXF provides support for building RESTful web services.

XML External Entity (XXE) vulnerability is a type of security vulnerability that allows an attacker to exploit XML parsers by injecting malicious XML entities, leading to various security risks.

The potential risks of this vulnerability include unauthorized access to sensitive information, server-side request forgery (SSRF) attacks, denial-of-service (DoS) attacks, and the execution of arbitrary code.

The CVSS score of this vulnerability is 7.5, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for org.apache.cxf:cxf-core.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 3.0.12 3.0.12
  • >= 3.1.0, < 3.1.9 3.1.9

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback