CVE-2022-27820: Improper Certificate Validation in OWASP ZAP

org.zaproxy:zap Updated 02 Oct 2025

Summary

25/03/2022
No i
Moderate
4.0

CVE-2022-27820: Improper Certificate Validation in OWASP ZAP. Affects org.zaproxy:zap versions < 2.11.1. No fix is published. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

OWASP Zed Attack Proxy (ZAP) is an open-source web application security scanner. It is designed to help developers identify vulnerabilities in their web applications and APIs. ZAP is widely used by security professionals and developers to perform security testing and penetration testing. However, the version w2022-03-21 of ZAP is vulnerable to an improper certificate validation issue.

Vulnerability Detail

The vulnerability in ZAP allows an attacker to perform a man-in-the-middle attack by presenting a fake TLS certificate. ZAP does not properly verify the TLS certificate chain of an HTTPS server, which means that it can be tricked into accepting a certificate from an attacker-controlled server. This could lead to sensitive information being intercepted or modified by an attacker. The vulnerability has a CVSS score of 4.0, indicating a moderate severity.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, you can manually verify the TLS certificate chain of the HTTPS server by using other tools or libraries that provide certificate validation. This will help ensure that the certificate presented by the server is valid and trusted. Here is an example of how to perform certificate validation using the Java programming language and the Apache HttpClient library:

import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.conn.ssl.NoopHostnameVerifier;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.ssl.SSLContextBuilder;

import java.io.IOException;
import java.security.KeyManagementException;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;

public class CertificateValidationExample {

    public static void main(String[] args) throws NoSuchAlgorithmException, KeyStoreException, KeyManagementException, IOException {
        HttpClient httpClient = HttpClients.custom()
                .setSSLSocketFactory(new SSLConnectionSocketFactory(SSLContextBuilder.create()
                        .loadTrustMaterial((chain, authType) -> {
                            // Perform custom certificate validation here
                            return true; // Always trust the certificate
                        })
                        .build(), NoopHostnameVerifier.INSTANCE))
                .build();

        HttpGet request = new HttpGet("https://example.com");
        HttpResponse response = httpClient.execute(request);

        // Process the response
    }
}

Please note that this is just an example and you should customize the certificate validation logic according to your specific requirements.

Conclusion

In conclusion, the version w2022-03-21 of OWASP ZAP is vulnerable to an improper certificate validation issue. This vulnerability allows an attacker to perform a man-in-the-middle attack and intercept or modify sensitive information. To mitigate this vulnerability, it is recommended to update to a patched version of ZAP once it becomes available. In the meantime, you can use the provided workaround or manually verify the TLS certificate chain of the HTTPS server using other tools or libraries.

See every vulnerability recorded for org.zaproxy:zap →

Share this vulnerability

FAQ

OWASP ZAP (Zed Attack Proxy) is an open-source web application security scanner used for identifying vulnerabilities in web applications and APIs.

This vulnerability allows an attacker to perform a man-in-the-middle attack and intercept or modify sensitive information exchanged between the ZAP instance and an HTTPS server.

The CVSS score of this vulnerability is 4.0, indicating a moderate severity.

To fix this vulnerability, you should update your ZAP installation to a version that includes the fix for the improper certificate validation issue. Monitor the official OWASP ZAP website or subscribe to their mailing list for updates on the release of a patched version.

As a temporary workaround, you can manually verify the TLS certificate chain of the HTTPS server using other tools or libraries that provide certificate validation.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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