# CVE-2020-35920: socket2 invalidly assumes the memory layout of std::net::SocketAddr

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.41%, higher than 37% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2020-11-06T12:00:00.000Z
- Modified: 2026-06-17T03:14:36.487Z
- Also known as: GHSA-458v-4hrf-g3m4, GHSA-c79c-gwph-gqfm, RUSTSEC-2020-0078, RUSTSEC-2020-0079
- Related: CVE-2020-35919
- Weaknesses: CWE-188
- Assigned by: mitre

## Description

An issue was discovered in the socket2 crate before 0.3.16 for Rust. It has false expectations about the std::net::SocketAddr memory representation.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- socket2 (crates.io): before 0.3.16; from 0.0.0-0 before 0.3.16
- net2 (crates.io): before 0.2.36; from 0.0.0-0 before 0.2.36
- rust-lang socket2: before 0.3.16

## Every score

- GitHub: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- RustSec Advisory Database: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:2.0 2.1 Low `AV:L/AC:L/Au:N/C:N/I:N/A:P`

## References

- <https://rustsec.org/advisories/RUSTSEC-2020-0079.html> (exploit, advisory, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2020-35920> (advisory)
- <https://github.com/deprecrated/net2-rs/issues/105> (report, web)
- <https://github.com/rust-lang/socket2-rs/issues/119> (report, web)
- <https://github.com/rust-lang/socket2-rs> (package)
- <https://rustsec.org/advisories/RUSTSEC-2020-0078.html> (advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2020-35919> (advisory)
- <https://github.com/deprecrated/net2-rs> (package)
- <https://crates.io/crates/net2> (package)
- <https://crates.io/crates/socket2> (package)

## Sources

- CVE List: [CVE-2020-35920](https://www.cve.org/CVERecord?id=CVE-2020-35920), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-458v-4hrf-g3m4](https://github.com/advisories/GHSA-458v-4hrf-g3m4), CC-BY-4.0, modified 2024-02-12
- GitHub Advisory Database: [GHSA-c79c-gwph-gqfm](https://github.com/advisories/GHSA-c79c-gwph-gqfm), CC-BY-4.0, modified 2023-11-08
- RustSec Advisory Database: [RUSTSEC-2020-0078](https://rustsec.org/advisories/RUSTSEC-2020-0078.html), CC0-1.0, modified 2023-11-08
- RustSec Advisory Database: [RUSTSEC-2020-0079](https://rustsec.org/advisories/RUSTSEC-2020-0079.html), CC0-1.0, modified 2024-02-10
- NVD: [CVE-2020-35920](https://nvd.nist.gov/vuln/detail/CVE-2020-35920), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2020-35920 · Whole record: https://cve.day/CVE-2020-35920.json · Rebuilt by cve.day 2026-11-25T22:57:56.655Z
