Talos Vulnerability Report

TALOS-2026-2452

Hangzhou Hikvision Digital Technology Co., Ltd. EZVIZ CS-C6N cloud snapshot improper certificate validation vulnerability

November 24, 2026

CVE Number

CVE-2026-86587

Summary

A improper certificate validation vulnerability exists in the cloud snapshot functionality of EZVIZ CS-C6N (version(s): V5.3.8 build 241021). A specially crafted series of network requests can lead to a disclosure of sensitive information. An attacker can perform a man-in-the-middle attack to trigger this vulnerability.

Confirmed Vulnerable Versions

The versions below were either tested or verified to be vulnerable by Talos or confirmed to be vulnerable by the vendor.

EZVIZ CS-C6N (version(s): V5.3.8 build 241021)

Product URLs

EZVIZ CS-C6N - https://www.ezviz.com/product/C6N/9046

CVSSv3 Score

5.9 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

CWE

CWE-295 - Improper Certificate Validation

Details

The EZVIZ CS-C6N is a consumer indoor Wi-Fi pan-and-tilt security camera from EZVIZ, the consumer and small-business brand of Hikvision, used for 1080p home and small-office monitoring with night vision, motion detection, and two-way audio.

When the camera uploads a current view snapshot to EZVIZ’s cloud it opens an encrypted connection but skips the check that confirms it is really talking to the genuine EZVIZ server — so anything sitting in the network path can impersonate the cloud and read the snapshot.

Root cause

The camera does its TLS using mbedTLS — a widely used open-source TLS library that is compiled into the firmware. EZVIZ wrote a thin wrapper around mbedTLS to open the connection to the cloud. In the wrapper the config of mbedTLS is set, one of mbedTLS’s settings is authmode, which controls how strictly the server certificate is checked. It has three values: VERIFY_REQUIRED (“check the certificate, and abort if it’s invalid” — the safe setting), VERIFY_OPTIONAL, and VERIFY_NONE (“don’t check the certificate at all — accept whatever the server sends”).

The upload routine sets things up in two steps that contradict each other: 1. It calls mbedtls_ssl_config_defaults(...), which loads mbedTLS’s secure defaults — including authmode = VERIFY_REQUIRED. At this point the connection would be safe. 2. On the very next step it calls mbedtls_ssl_conf_authmode(conf, VERIFY_NONE), explicitly changing authmode to VERIFY_NONE — deliberately turning the certificate check back off.

So when the TLS handshake runs, the camera accepts any certificate — the real cloud’s or an attacker’s — without checking it, and it never calls mbedTLS’s “did verification pass?” function (mbedtls_ssl_get_verify_result) to notice. The upload channel ends up encrypted but unauthenticated: the bytes are scrambled on the wire, but the camera has no idea who is actually on the other end.

// ezviz_upload_ssl_connect  (sub_A00E97D0; near-identical twin sub_A00F45EC -- same VERIFY_NONE core, differs only in error/logging). Firmware base 0xA0000000.
mbedtls_ssl_config_defaults(conf, ...);  // loads mbedTLS's secure defaults -> authmode = VERIFY_REQUIRED (2): "check the server cert"
mbedtls_ssl_conf_authmode(conf, 0);      // <-- THE BUG (@0xA00E9868): authmode = VERIFY_NONE (0): "do NOT check the cert"
mbedtls_ssl_conf_rng(conf, ...);
... mbedtls_ssl_setup / mbedtls_ssl_set_bio ...
mbedtls_ssl_handshake(ssl);              // handshake now succeeds against ANY cert -- a forged / man-in-the-middle cert is accepted
// mbedtls_ssl_get_verify_result() is never called, so the camera never even learns the cert was untrusted

In the firmware, the two setup calls just before the conf_authmode line are wrapped in ordinary error checks — “if this step failed, log it and give up” — and the VERIFY_NONE line sits in the final else:

if ( ctr_drbg_seed(...) )            // "if seeding the random-number generator FAILED, give up"
    { log; return; }
else if ( config_defaults(...) )     // "if loading the default TLS settings FAILED, give up"
    { log; return; }
else                                 // neither failed -> keep going
    mbedtls_ssl_conf_authmode(conf, 0);   // turn OFF certificate checking (the bug)

These functions return 0 on success, so each error branch fires only when that step fails. In normal operation both succeed: the random-number generator seeds fine, and for a client config_defaults cannot fail (its only failure path is server-side Diffie-Hellman setup, which a client never runs). Both checks are therefore false, and control always falls through to the else. So certificate checking is disabled on the everyday success path — not on some unusual error path. The only way to avoid the VERIFY_NONE line is for the crypto setup itself to fail (e.g. no entropy), in which case the camera aborts and makes no connection at all. There is no path where the camera connects normally and keeps certificate validation on.

Setting authmode is not itself a check — it just records a preference that the handshake consults later. When the camera receives the server’s certificate during the handshake, mbedTLS’s certificate-parsing step reads that same authmode value and runs the certificate-validity check only if it is not VERIFY_NONE. Because the upload routine set it to VERIFY_NONE, that validity check is skipped outright and the certificate is accepted without ever being examined. We traced this end to end, from the handshake into mbedtls_ssl_parse_certificate and the conditional that guards the mbedtls_x509_crt_verify call.

Every link below is read directly from the firmware image. The point is that the field that gets set to VERIFY_NONE is the same field, at the same address (conf+0x90, bits 2-3) that the handshake later reads to decide whether to verify — so there is no ambiguity that the disabled setting is the one actually honoured:

Step Where What it does
Producer config_defaults(conf, CLIENT) @0xA00E9858 sets authmode = VERIFY_REQUIRED (2) — the safe default
Override (the bug) conf_authmode(conf, 0) @0xA00E9868 sets authmode = VERIFY_NONE (0) → stored in conf+0x90, bits 2-3
Bind ssl_setup(config+238, config+294) @0xA00E9884 binds that same conf to the SSL context used for the handshake
Consumer parse_certificate @0xA01FFC74 reads authmode = (conf[0x90] >> 2) & 3(0xA01FFCA8-0xA01FFCB8); at 0xA0200098, if (authmode) gates certificate verification, so x509_crt_verify @0xA020D7E0 is called only when authmode != 0

With the override forcing authmode = 0, the consumer’s if(authmode) is false, so x509_crt_verify is never reached and the server certificate is accepted unexamined.

Every TLS-connect routine we could statically resolve in this firmware sets VERIFY_NONE — two near-identical, copy-pasted routines (0xA00E97D0 and 0xA00F45EC, differing only in their error/logging paths) and a third (0xA01E8134); each calls config_defaults then conf_authmode(conf, 0) on its success path. A scan of the image finds exactly three conf_authmode call sites, all passing 0 — there is no VERIFY_REQUIRED caller in this segment.

Replication

The EZVIZ camera uploads a snapshot of the current camera view when it receives an MQTT PUBLISH command /BG9440949/3100/13412 via port 8820 from the cloud server.

Each snapshot is uploaded to the cloud server (in our test pmseu1.ezvizlife.com:8444) with TLS encryption as:

POST /https/sdk.post HTTP/1.1
service-name: capture
Host: pmseu1.ezvizlife.com:8444
Content-Type: application/x-www-form-urlencoded

filename=undefined&code=
<encryption OFF: raw JPEG (FF D8 FF ...)>
<encryption ON : hikencodepicture<encryptPwd 32-hex><AES-128-CBC ciphertext>>

After the upload, the server responds with a URL for the snapshot’s download location on the cloud:

HTTP/1.1 200 OK
Date: Wed, 03 Jun 2026 21:41:41 GMT
Server: nginx
Content-Length: 68
Connection: Close

/image/oracle/pic/4012e396487e4135b9ce5b34255e7ba7/common?c=5216d3b4 An on-path attacker can exploit this bug to perform a MITM, listen to the MQTT commands and the snapshot-upload traffic, and recover the uploaded snapshot.

To achieve this attack, the threat actor does:

  1. Take an on-path position on the camera’s network or any upstream hop — ARP poisoning on the LAN, a rogue AP, a controlled gateway/router, or an ISP-level vantage.
  2. Run a transparent TLS terminator (sslsplit / mitmproxy) presenting any certificate the upload client will never check. No trusted CA and no victim-installed certificate is needed — in our capture this was a leaf forged for *.ezvizlife.com and signed by the attacker’s own untrusted CA (ezlab-mitm), not a self-signed leaf (though a self-signed one is accepted just as readily, since no validation occurs at all).
  3. Capture the POST /https/sdk.post upload to pmseu1.ezvizlife.com:8444.
  4. Encryption OFF → the body after code= is a raw JPEG; the snapshot is recovered directly.

  5. Encryption ON → the body carries hikencodepicture + encryptPwd + AES ciphertext, where encryptPwd = MD5(MD5(verification_code)) and the AES key is the verification code itself (zero-padded). For a camera at its default code — 6 uppercase letters, 26⁶ ≈ 3×10⁸ — recover the code offline by searching for MD5(MD5(code)) == encryptPwd (seconds), then decrypt. A user-changed strong password is not trivially recoverable — but that camera’s snapshots are still exposed whenever encryption is OFF.

The :8444 upload’s HTTP response returns the snapshot’s cloud URL: GET /image/oracle/pic/<32-hex id>/common?c=<token> (same host). The <id> is unique per upload; ?c= is the device’s image-access token, observed constant across all of the device’s snapshots (e.g. c=5216d3b4). So an on-path attacker who reads that response (via the same MITM) — or the equivalent app-side HTTPS fetch — obtains a URL+token that pulls the snapshot directly from the cloud (the same object the app downloads), decryptable with the recovered code. Verified end-to-end: fetching two such URLs returned hikencodepicture blobs that decrypted to JPEGs byte-identical to the intercepted uploads.

Dynamic confirmation

The bug is not only inferred from the firmware; it was reproduced against the live camera (CS-C6N, 192.168.1.128). A box in the camera’s network path ran sslsplit with an attacker-controlled lab CA (/O=ezlab/CN=ezlab-mitm), minting leaf certificates on the fly, and transparently terminated the camera’s upload connection to pmseu1.ezvizlife.com:8444. The camera completed the handshake against that forged certificate and uploaded its snapshot — only possible because the upload client never validates the server certificate.

1. The camera accepted a forged certificate. In sslsplit’s log, origcrt is the genuine EZVIZ cloud cert seen upstream; usedcrt is the different cert sslsplit forged and presented to the camera — and the camera used it: ssl 192.168.1.128:57561 → 54.73.31.183:8444 names:*.ezvizlife.com origcrt: 274403CEF1161FC5ACC0E13B33FB528D487B60F9 ← real EZVIZ cloud cert (seen upstream) usedcrt: 4A59F7EAC78C9338CDCB08883E208A23A95897F8 ← attacker-forged cert the camera ACCEPTED

Every field on that line is the proof: - 192.168.1.128 is the camera itself (DUT BG9440949) — its own connection. - :8444 is the snapshot-upload channel — the exact connection the VERIFY_NONE routine governs. - origcrt ≠ usedcrt : origcrt (2744…) is the real EZVIZ cloud cert seen upstream; usedcrt (4A59…) is the cert sslsplit forged on the fly and presented to the camera. The camera completed the TLS 1.2 handshake against the forged one.

That forged leaf was signed by a CA the camera has no reason to trust and no way to be configured to trust (sslsplit.log: Loaded CA: '/O=ezlab/CN=ezlab-mitm' … SSL/TLS leaf certificates … Generated on the fly). The forged leaf copies the genuine certificate’s subject and SANs (CN=*.ezvizlife.com), so a hostname check would pass — the only defect is the untrusted issuer, which is exactly the chain-of-trust check VERIFY_NONE skips.

2. The snapshot came out the other side. sslsplit’s decrypted content log for that connection is the upload itself, and a matched pair (same camera, same endpoint, same MITM) isolates the image-encryption variable:

POST /https/sdk.post HTTP/1.1
service-name: capture
Host: pmseu1.ezvizlife.com:8444
Content-Length: 19230

filename=undefined&code=<body>
Session code= body Outcome
enc OFF raw JPEG (FF D8 FF) right after code= plaintext snapshot recovered directly (512×288 JPEG)
enc ON hikencodepicture + 32-hex encryptPwd + AES-128-CBC ciphertext upload still intercepted; decrypted here with the DUT’s known password (Hacker1337). For a default-code camera the key is recovered offline from encryptPwd (26⁶, trivial)

In both runs the attacker terminates the camera’s “secure” upload channel without any certificate trust; encryption state only changes whether the body is readable immediately (OFF) or after recovering the verification code (ON — trivial for a default 6-letter code; for our changed-password DUT, decrypted with the known code).

A camera was handed a certificate it had never seen, with the wrong issuer, signed by an attacker’s CA — and it uploaded its snapshot regardless. That is an empirical fact about the running device. The capture also carries its own control: on the same box, with the same forged cert, the camera’s verifying TLS client rejected it (unknown_ca) while the upload client accepted it — same cert, same device, opposite outcomes — which rules out “the camera happened to trust ezlab-mitm” and pins the missing check to the upload routine specifically.

Impact

An on-path attacker on the camera’s network — or any upstream hop, including an ISP — can intercept the snapshots the camera uploads, with no certificate trust and no deliberate user action (the upload happens automatically whenever the owner’s app is open). With image encryption OFF the snapshots are recovered as plaintext; with encryption ON the same upload leaks encryptPwd = MD5(MD5(code)), from which a default verification code (6 uppercase letters, 26⁶) is brute-forced offline in seconds to decrypt them — only a user-changed strong password resists this. This defeats the confidentiality that TLS and image encryption are meant to provide for camera snapshots.

The snapshot-upload command is driven automatically by the app. It was observed being sent when the app launches and while it is in use. So an on-path attacker passively harvests the camera’s current view every time the legitimate owner opens or uses the app — requiring no interaction with the camera, only the owner’s normal usage. In addition, Each upload is retained server-side at its own /image/oracle/pic/<id>/common?c=<token> URL (observed persisting for hours, fetchable with the URL + the device’s constant token), so the same fail-open also exposes a downloadable archive of past views, not just the live frame.

Vendor Response (CVE-2026-86587)

Vendor Link: https://www.ezviz.com/inter/trust-center/security/security-notice/Improper%20Certificate%20Validation

Vendor Notes: Improper Certificate Validation Vulnerability - CVE ID: CVE-2026-86587 (TALOS-2026-2452) - CWE: CWE-295 - CVSS v3.1 Score: 5.3 (AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N) - Remediation: Fixed via a server-side configuration update. Devices now enforce mandatory TLS certificate authentication and will actively terminate the connection upon verification failure. - Advisory: https://www.ezviz.com/inter/trust-center/security/security-notice/Improper%20Certificate%20Validation

Timeline

2026-08-03 - Initial Vendor Contact
2026-08-03 - Vendor Disclosure
2026-11-20 - Vendor Patch Release
2026-11-23 - Public Release

Credit

Chi-en (Ashley) Shen of Cisco Talos