CVE-2013-7398: Insufficient Verification of Data Authenticity in Async Http Client

com.ning:async-http-client Updated 02 Oct 2025

Summary

13/05/2022
Yes i
Moderate
Not published

CVE-2013-7398: Insufficient Verification of Data Authenticity in Async Http Client. Affects com.ning:async-http-client versions < 1.9.0. Fixed in 1.9.0. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Async Http Client (AHC) is a popular open-source library for making asynchronous HTTP requests in Java. It provides a convenient API for sending HTTP requests and handling responses asynchronously. AHC is widely used in various applications and frameworks to perform HTTP communication. However, versions of AHC before 1.9.0 are vulnerable to an insufficient verification of data authenticity issue.

Vulnerability Detail

The vulnerability in AHC arises from the fact that it does not require a hostname match during the verification of X.509 certificates. This allows an attacker to perform a man-in-the-middle attack and spoof HTTPS servers by presenting an arbitrary valid certificate. By intercepting the communication between the client and the server, the attacker can read or modify the data exchanged, potentially leading to unauthorized access, data leakage, or other security breaches.

How To Fix

Latest published version: 1.9.40 as of 22 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.9.0

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading to the latest version of AHC is not immediately feasible, a possible workaround is to manually implement hostname verification in the application code. This can be done by using a custom SSLContext that performs the necessary hostname checks during certificate validation. Here is an example of how to create a custom SSLContext with hostname verification:

import javax.net.ssl.SSLContext;
import javax.net.ssl.X509TrustManager;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;

public class CustomSSLContext {

    public static SSLContext create() throws Exception {
        SSLContext sslContext = SSLContext.getInstance("TLS");
        sslContext.init(null, new X509TrustManager[]{
            new X509TrustManager() {
                @Override
                public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {
                    // Do nothing
                }

                @Override
                public void checkServerTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {
                    // Perform hostname verification here
                    // Throw CertificateException if hostname does not match
                }

                @Override
                public X509Certificate[] getAcceptedIssuers() {
                    return null;
                }
            }
        }, null);
        return sslContext;
    }
}

Conclusion

The insufficient verification of data authenticity vulnerability in Async Http Client (AHC) before version 1.9.0 can allow man-in-the-middle attackers to spoof HTTPS servers. It is crucial to upgrade to the latest version of AHC or implement the recommended workaround to mitigate the risk of unauthorized access, data leakage, or other security breaches. For further assistance on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for com.ning:async-http-client →

Share this vulnerability

FAQ

Async Http Client (AHC) is an open-source library for making asynchronous HTTP requests in Java. It provides a convenient API for sending HTTP requests and handling responses asynchronously. AHC is widely used in various applications and frameworks to perform HTTP communication.

The vulnerability allows a man-in-the-middle attacker to spoof HTTPS servers by presenting an arbitrary valid certificate. This can lead to unauthorized access, data leakage, or other security breaches if the attacker intercepts and modifies the communication between the client and the server.

To fix this vulnerability, it is recommended to upgrade to version 1.9.0 or later of Async Http Client (AHC). This version includes the necessary changes to enforce hostname matching during certificate verification, thereby preventing man-in-the-middle attacks.

If upgrading to the latest version of Async Http Client (AHC) is not immediately feasible, a possible workaround is to manually implement hostname verification in the application code. This can be done by using a custom SSLContext that performs the necessary hostname checks during certificate validation.

You can find more information about this vulnerability in the official CVE entry: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-7398

Related vulnerabilities

Recent vulnerabilities recorded for com.ning:async-http-client.

How To Fix

Latest published version: 1.9.40 as of 22 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.9.0

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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