# CVE-2015-2674: Restkit Does Not Validate TLS certificates

> Man-in-the-middle attackers can spoof TLS servers because the library uses default settings that disable certificate verification.

- **Severity:** Medium 5.9 (`CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 9 Aug 2017
- **Updated:** 6 Aug 2024
- **Also known as:** GHSA-p9cv-hrxr-fxx8, PYSEC-2017-69, UBUNTU-CVE-2015-2674

## What is CVE-2015-2674?

CVE-2015-2674 is a medium-severity vulnerability in n/a, published on 9 Aug 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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.

Weakness: CWE-295 (Improper Certificate Validation)

## Which versions are affected by CVE-2015-2674?

3 open source packages ship an affected version, including restkit. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `restkit` | PyPI | All versions to 4.2.2 | None |
| `restkit` | PyPI | All versions to 4.2.2 | None |
| `restkit` | PyPI | From 1.0.0 | None |

Products: Restkit Restkit.

## How do I fix CVE-2015-2674?

No fix has been published for CVE-2015-2674 yet. Limit exposure of the affected software until one is available.

## Is CVE-2015-2674 being exploited?

There is no known exploitation of CVE-2015-2674 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2015-2674 and fix it if it is affected.

What it is: CVE-2015-2674 is a medium-severity vulnerability in n/a, published on 9 Aug 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2015-2674 in the wild and no public exploit code.

Affected packages and fixed versions:
- restkit (PyPI): affected all versions up to 4.2.2; no fix listed
- restkit (PyPI): affected all versions up to 4.2.2; no fix listed
- restkit (PyPI): affected from 1.0.0; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2015-2674/ (Markdown: https://insights.sbomify.com/CVE-2015-2674/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2015-2674
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2015-2674
- OSV: https://osv.dev/vulnerability/CVE-2015-2674

---
From sbomify Insights: https://insights.sbomify.com/CVE-2015-2674/
Summaries are generated and may contain mistakes; the official description above is the record.
