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

Published Feb 18, 2025
·
Updated

Summary

Problem: Potential man-in-the-middle attacks due to missing SSL certificate verification in the project codebase and used third-party libraries.

Details

In the past, aiohttp-session/request had the parameter verifyssl 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 verifyssl 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.

Example: https://github.com/home-assistant/core/blob/c4411914c2e906105b765c00af5740bd0880e946/homeassistant/components/discord/notify.py#L84

When you scan the libraries used by the integrations in Home Assistant, you will find more issues like this.

The general handling in Home Assistant looks good, as homeassistant.helpers.aoihttpclient.asyncgetconnector handles it correctly.

PoC

1. Check that expired.badssl.com:443 gives an SSL error in when connecting with curl or browser. 2. Add the integration adguard with the setting host=expired.badssl.com, port=443, use-ssl=true, verify-ssl=true. 3. Check the logs - you get a HTTP 403 response.

Expected behavior: 1. The integration log shows an ssl.SSLCertVerificationError.

The following code shows the problem with ssl=True. No exception is raised when ssl=True (Python 3.11.6).

import asyncio from ssl import SSLCertVerificationError

import aiohttp

BADURL = "https://expired.badssl.com/"

async def runrequest(verifyssl, resultplaceholder: str): async with aiohttp.ClientSession() as session: exceptionfired: bool = False try: await session.request("OPTIONS", BADURL, ssl=verifyssl) except SSLCertVerificationError: exceptionfired = True except Exception as error: print(error) else: exceptionfired = False print(resultplaceholder.format(exceptionresult=exceptionfired))

Case 1: ssl=False --> expected result: No exception asyncio.run(runrequest(False, "Test case 1: expected result: False - result: {exceptionresult}"))

Case 2: ssl=None --> expected result: Exception asyncio.run(runrequest(None, "Test case 2: expected result: True - result: {exceptionresult}"))

Case 3: ssl=True --> expected result: No Exception asyncio.run(runrequest(True, "Test case 3: expected result: False - result: {exceptionresult}"))

Other sources

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 verifyssl 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 verifyssl 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.

MITRE

Affected Software

2 affected componentsFixes available
Home Assistant Core<2024.1.6
pip/homeassistant<2024.1.6
2024.1.6

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/homeassistant to a version that resolves this vulnerability.

    Fixed in 2024.1.6
  2. Upgrade

    Upgrade home-assistant/core to a version that resolves this vulnerability.

    Fixed in 2024.1.6

Event History

Feb 18, 2025
CVE Published
via MITRE·06:53 PM
Data Sourced
via MITRE·06:53 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:15 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·07:25 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-25305?

CVE-2025-25305 is considered a high-severity vulnerability due to the risk of potential man-in-the-middle attacks.

2

How do I fix CVE-2025-25305?

To fix CVE-2025-25305, upgrade to Home Assistant Core version 2024.1.6 or later.

3

What is the main issue with CVE-2025-25305?

The main issue with CVE-2025-25305 is the missing SSL certificate verification, which can expose the application to man-in-the-middle attacks.

4

Which versions of Home Assistant are affected by CVE-2025-25305?

Versions of Home Assistant prior to 2024.1.6 are affected by CVE-2025-25305.

5

What components are involved in CVE-2025-25305?

CVE-2025-25305 involves the improperly managed SSL certificate verification in aiohttp-session and other third-party libraries.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203