# CVE-2025-25305: SSL validation for outgoing requests in Home Assistant Core and used libs not correct

> Home Assistant Core fails to verify SSL certificates due to incorrect parameter migration, allowing man-in-the-middle attacks on outgoing requests.

- **Severity:** High 7.0 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 18 Feb 2025
- **Updated:** 18 Feb 2025
- **Also known as:** GHSA-m3pm-rpgg-5wj6, PYSEC-2026-1452

## What is CVE-2025-25305?

CVE-2025-25305 is a high-severity vulnerability in home-assistant core, published on 18 Feb 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Home Assistant Core is an open source home automation that puts local control and privacy first. Affected versions are subject to a potential man-in-the-middle attacks due to missing SSL certificate verification in the project codebase and used third-party libraries. In the past, `aiohttp-session`/`request` had the parameter `verify_ssl` to control SSL certificate verification. This was a boolean value. In `aiohttp` 3.0, this parameter was deprecated in favor of the `ssl` parameter. Only when `ssl` is set to `None` or provided with a correct configured SSL context the standard SSL certificate verification will happen. When migrating integrations in Home Assistant and libraries used by Home Assistant, in some cases the `verify_ssl` parameter value was just moved to the new `ssl` parameter. This resulted in these integrations and 3rd party libraries using `request.ssl = True`, which unintentionally turned off SSL certificate verification and opened up a man-in-the-middle attack vector. This issue has been addressed in version 2024.1.6 and all users are advised to upgrade. There are no known workarounds for this vulnerability.

Weakness: CWE-940 (Improper Verification of Source of a Communication Channel)

## Which versions are affected by CVE-2025-25305?

3 open source packages ship an affected version, including homeassistant.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `homeassistant` | PyPI | All versions | 2024.1.6 |
| `homeassistant` | PyPI | All versions | 2024.1.6 |
| `homeassistant` | PyPI | All versions | 2024.1.6 |

## How do I fix CVE-2025-25305?

Upgrade homeassistant to 2024.1.6 or later.

## Is CVE-2025-25305 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-25305 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-25305 and fix it if it is affected.

What it is: CVE-2025-25305 is a high-severity vulnerability in home-assistant core, published on 18 Feb 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-25305 exists.

Affected packages and fixed versions:
- homeassistant (PyPI): affected all versions; fixed in 2024.1.6
- homeassistant (PyPI): affected all versions; fixed in 2024.1.6
- homeassistant (PyPI): affected all versions; fixed in 2024.1.6

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-2025-25305/ (Markdown: https://insights.sbomify.com/CVE-2025-25305/index.md)
```

## Sources

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

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