CVE-2026-16516

Source
https://cve.org/CVERecord?id=CVE-2026-16516
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-16516.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-16516
Published
2026-10-07T02:38:23Z
Modified
2026-10-09T07:06:55Z
Severity
  • 9.0 (Critical) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:H/VA:N/SC:L/SI:H/SA:N CVSS Calculator
Summary
wolfSSH ECDSA host key curve not validated against negotiated algorithm
Details

wolfSSH does not validate that the ECDSA curve identifier in a KEXDH_REPLY host key blob matches the algorithm negotiated during key exchange. In ParseECCPubKey() (src/internal.c), the blob's algorithm string is used to derive the curve via NameToId/wcPrimeForId without checking against the negotiated ssh->handshake->pubKeyId, and the RFC 5656 curve identifier string is discarded via GetSkip() rather than compared. An active network man-in-the-middle attacker can substitute a host key blob containing a different ECDSA curve, causing the client to import the key on the wrong curve. Because the attacker controls the private key for the substituted curve, signature verification passes. Exploitation requires an active MitM position and a lax public key check callback (e.g., TOFU, algorithm-name-only check, or fingerprint match against the parsed key).

Database specific
{
    "cna_assigner": "wolfSSL",
    "cwe_ids": [
        "CWE-345"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/16xxx/CVE-2026-16516.json",
    "unresolved_ranges": [
        {
            "extracted_events": [
                {
                    "fixed": "1.6.0"
                }
            ],
            "source": "AFFECTED_FIELD"
        }
    ]
}
References

Affected packages

Git / github.com/wolfssl/wolfssh

Affected ranges

Type
GIT
Repo
https://github.com/wolfssl/wolfssh
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Database specific
Show details
{
    "source": "REFERENCES"
}

Affected versions

v0.*
v0.1
v0.2.0
v1.*
v1.0.0-RC1
v1.0.0-RC2
v1.1.0-stable
v1.2.0-stable
v1.2.2
v1.3.0-stable
v1.4.0-stable
v1.4.10-stable
v1.4.11-stable
v1.4.12-stable
v1.4.13-stable
v1.4.14-stable
v1.4.15-stable
v1.4.16
v1.4.17-stable
v1.4.18-stable
v1.4.19-stable
v1.4.2-stable
v1.4.20-stable
v1.4.21-stable
v1.4.22-stable
v1.4.3-stable
v1.4.4-stable
v1.4.5-stable
v1.4.6-stable
v1.4.7-stable
v1.4.8-stable
v1.4.9
v1.5.0-stable

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-16516.json"
vanir_signatures
[
    {
        "deprecated": false,
        "digest": {
            "line_hashes": [
                "173283588981822201319425411895038840156",
                "94389535972258584596617964034496812188",
                "283525909293875176489383091419791288025",
                "258320632904250201376928896356878427716",
                "247725557637521358643902008280522487663",
                "235169630732187739564501012239996621830",
                "7722320009576127062619943016726865867"
            ],
            "threshold": 0.9
        },
        "id": "CVE-2026-16516-1a1da3c2",
        "signature_type": "Line",
        "signature_version": "v1",
        "source": "https://github.com/wolfssl/wolfssh/commit/31d13697a608fa1bf9eec11aa6eff1503ade836f",
        "target": {
            "file": "tests/unit.c"
        }
    },
    {
        "deprecated": false,
        "digest": {
            "function_hash": "157204180424465112889507058128564495047",
            "length": 5121
        },
        "id": "CVE-2026-16516-41443a84",
        "signature_type": "Function",
        "signature_version": "v1",
        "source": "https://github.com/wolfssl/wolfssh/commit/31d13697a608fa1bf9eec11aa6eff1503ade836f",
        "target": {
            "file": "tests/unit.c",
            "function": "wolfSSH_UnitTest"
        }
    },
    {
        "deprecated": false,
        "digest": {
            "line_hashes": [
                "53489913765151338595114576166495316281",
                "73747952074627090495710218318049163700",
                "36619387398801613911806708630610244881",
                "185866648850527571947782745572823974695",
                "16037351012624450559874910678683463056",
                "339957084877397555512210980389519319756",
                "301775856679137590844520675042268265487",
                "238434335097726708845773391900857095009",
                "261100036956457211674042637574206306612",
                "205834708152648974029253307375267744390",
                "146873387935921213355086694655190541850",
                "169641516039695352912288844984124712243",
                "173455713224188150309913072957950311046",
                "275652757193125734993458777507602251845",
                "157788764194786105031689744233695328235",
                "243532182201959161161041695098003394761",
                "337527576283813431051198924515487847882",
                "106007959024773196566906657147402152764",
                "244346232202868777668612449761284337296",
                "152829806387201342135836477245069343185",
                "270974913658789591888375221998205828533",
                "319276422361746835884652975439971790583"
            ],
            "threshold": 0.9
        },
        "id": "CVE-2026-16516-8ee25c3b",
        "signature_type": "Line",
        "signature_version": "v1",
        "source": "https://github.com/wolfssl/wolfssh/commit/31d13697a608fa1bf9eec11aa6eff1503ade836f",
        "target": {
            "file": "src/internal.c"
        }
    },
    {
        "deprecated": false,
        "digest": {
            "function_hash": "229533950028042363854465638353854427844",
            "length": 1272
        },
        "id": "CVE-2026-16516-a171498e",
        "signature_type": "Function",
        "signature_version": "v1",
        "source": "https://github.com/wolfssl/wolfssh/commit/31d13697a608fa1bf9eec11aa6eff1503ade836f",
        "target": {
            "file": "src/internal.c",
            "function": "ParseECCPubKey"
        }
    },
    {
        "deprecated": false,
        "digest": {
            "line_hashes": [
                "154067002598565368022189580749449791988",
                "225101828839108010086675570297137648449",
                "193673971179151070397911320709545688418",
                "53474428677424385525850242245596602080"
            ],
            "threshold": 0.9
        },
        "id": "CVE-2026-16516-ec9971ff",
        "signature_type": "Line",
        "signature_version": "v1",
        "source": "https://github.com/wolfssl/wolfssh/commit/31d13697a608fa1bf9eec11aa6eff1503ade836f",
        "target": {
            "file": "wolfssh/internal.h"
        }
    }
]
vanir_signatures_modified
"2026-10-09T07:06:55Z"