{"answers":{"affected":"4 open source packages ship an affected version, including com.squareup.okhttp3:okhttp. It affects 2 products.","exploited":"There is no known exploitation of CVE-2016-2402 in the wild and no public exploit code.","fix":"Upgrade com.squareup.okhttp3:okhttp to a fixed version for your release line: 2.7.4 or 3.1.2.","what":"CVE-2016-2402 is a medium-severity vulnerability in n/a, published on 30 Jan 2017. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2016-2402 and fix it if it is affected.\n\nWhat it is: CVE-2016-2402 is a medium-severity vulnerability in n/a, published on 30 Jan 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2016-2402 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- com.squareup.okhttp3:okhttp (Maven): affected all versions; fixed in 2.7.4\n- com.squareup.okhttp3:okhttp (Maven): affected all versions; fixed in 2.7.4\n- com.squareup.okhttp3:okhttp (Maven): affected from 3.0.0; fixed in 3.1.2\n- com.squareup.okhttp3:okhttp (Maven): affected from 3.0.0; fixed in 3.1.2\n\nTask:\n1. 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.\n2. 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.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2016-2402/ (Markdown: https://insights.sbomify.com/CVE-2016-2402/index.md)","id":"CVE-2016-2402","markdown":"https://insights.sbomify.com/CVE-2016-2402/index.md","name":"CVE-2016-2402","record":{"aliases":["CLEANSTART-2026-HM98634","GHSA-4hc2-jh7r-wrc3"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Java HTTP client library","requires_auth":"none","summary":"Man-in-the-middle attackers can bypass certificate pinning in OkHttp by presenting a valid chain from a non-pinned trusted CA.","user_interaction":"not_required","vuln_class":"security_feature_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"okhttp","vendor":"squareup"},{"product":"okhttp3","vendor":"squareup"}],"cvss":{"score":5.9,"severity":"medium","source":"nvd","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-295","name":"Improper Certificate Validation"}],"description":"OkHttp before 2.7.4 and 3.x before 3.1.2 allows man-in-the-middle attackers to bypass certificate pinning by sending a certificate chain with a certificate from a non-pinned trusted CA and the pinned certificate.","ecosystems":["Maven"],"exploits":{"exploitdb":0,"first_seen":"2016-03-20","github_poc":2,"max_poc_stars":13,"metasploit":0,"nuclei":0,"refs":[{"date":"2016-03-20T18:04:40Z","kind":"github_poc","ref":"https://github.com/ikoz/cert-pinning-flaw-poc","stars":13,"title":"Simple script for testing CVE-2016-2402 and similar flaws"},{"date":"2016-03-30T23:45:06Z","kind":"github_poc","ref":"https://github.com/ikoz/certPinningVulnerableOkHttp","stars":10,"title":"OkHttp sample app vulnerable to CVE-2016-2402"}],"tier":"poc_unverified"},"has_fix":true,"headline":"Improper Certificate Validation in OkHttp","id":"CVE-2016-2402","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"security_feature_bypass","year":"2016"},"n_packages":4,"n_references":5,"next":{"headline":"Symfony Authentication Bypass","id":"CVE-2016-2403"},"packages":[{"ecosystem":"Maven","fixed":["2.7.4"],"introduced":["0"],"last_affected":[],"package":"com.squareup.okhttp3:okhttp","purl":null,"source":"GHSA-4hc2-jh7r-wrc3"},{"ecosystem":"Maven","fixed":["2.7.4"],"introduced":["0"],"last_affected":[],"package":"com.squareup.okhttp3:okhttp","purl":"pkg:maven/com.squareup.okhttp3/okhttp","source":"GHSA-4hc2-jh7r-wrc3"},{"ecosystem":"Maven","fixed":["3.1.2"],"introduced":["3.0.0"],"last_affected":[],"package":"com.squareup.okhttp3:okhttp","purl":null,"source":"GHSA-4hc2-jh7r-wrc3"},{"ecosystem":"Maven","fixed":["3.1.2"],"introduced":["3.0.0"],"last_affected":[],"package":"com.squareup.okhttp3:okhttp","purl":"pkg:maven/com.squareup.okhttp3/okhttp","source":"GHSA-4hc2-jh7r-wrc3"}],"prev":{"headline":"Integer overflow in n/a","id":"CVE-2016-2399"},"products":["n/a"],"published":"2017-01-30","related":[{"cvss_score":5.9,"headline":"Security feature bypass in n/a","id":"CVE-2018-20200","kev_date_added":null,"published":"2019-04-18"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-05","vendors":["n/a"]},"summary":"Man-in-the-middle attackers can bypass certificate pinning in OkHttp by presenting a valid chain from a non-pinned trusted CA.","url":"https://insights.sbomify.com/CVE-2016-2402/"}