CVE-2015-2674: Restkit TLS Server Spoofing Vulnerability

restkit Updated 02 Oct 2025

Summary

09/08/2017
No i
Moderate
5.9

CVE-2015-2674: Restkit allows man-in-the-middle attackers to spoof TLS servers by leveraging use of the ssl.wrap_socket function in Python with the default CERT_NONE value for the cert_reqs argument. Affects restkit versions >= 1.0.0. 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 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

Restkit is a Python package available on PyPI that provides a framework for interacting with RESTful APIs. It offers features such as request/response handling, authentication, and error handling. The package has been widely used for building web applications and services.

Vulnerability Detail

The vulnerability (CVE-2015-2674) in Restkit allows man-in-the-middle attackers to spoof TLS servers. This is possible due to the use of the ssl.wrap_socket function in Python with the default CERT_NONE value for the cert_reqs argument. By exploiting this vulnerability, an attacker can intercept and modify the communication between the client and the server, potentially leading to unauthorized access, data leakage, or other malicious activities.

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

If upgrading to a patched version of Restkit is not immediately feasible, a possible workaround is to manually modify the code that uses the ssl.wrap_socket function. By setting the cert_reqs argument to CERT_REQUIRED instead of CERT_NONE, the TLS server spoofing vulnerability can be mitigated. Here is an example of how to modify the code:

import ssl

# Existing code
ssl.wrap_socket(sock, cert_reqs=ssl.CERT_NONE)

# Modified code
ssl.wrap_socket(sock, cert_reqs=ssl.CERT_REQUIRED)

Conclusion

The TLS server spoofing vulnerability in Restkit (CVE-2015-2674) can be exploited by attackers to impersonate servers and manipulate communication. It is crucial to update Restkit to a patched version or apply the recommended workaround to mitigate the risk. For further assistance with vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for restkit →

Share this vulnerability

FAQ

The vulnerability allows attackers to impersonate TLS servers and intercept or modify the communication between clients and servers. This can lead to unauthorized access, data leakage, or other malicious activities.

The vulnerability was introduced in Restkit version 1.0.0. Prior versions may also be affected.

While specific exploits targeting this vulnerability may exist, there are no publicly known exploits at the time of this report. However, it is important to address the vulnerability promptly to mitigate the risk.

Yes, the maintainers of Restkit have released patched versions of the package that address this vulnerability. It is recommended to update to the latest version to ensure the vulnerability is fixed.

Yes, a temporary workaround is to modify the code that uses the ssl.wrap_socket function. By setting the cert_reqs argument to CERT_REQUIRED instead of CERT_NONE, the vulnerability can be mitigated. However, upgrading to a patched version of Restkit is the recommended long-term solution.

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