{"id":"CVE-2019-11840","aliases":["CVE-2019-11840","GHSA-r5c5-pr8j-pfp7","GO-2022-0209"],"related":["CGA-w77q-hxpv-cjw3"],"kind":"vulnerability","state":"published","title":"golang.org/x/crypto/salsa20/salsa uses insufficiently random values","summary":"An issue was discovered in the supplementary Go cryptography library, golang.org/x/crypto, before v0.0.0-20190320223903-b7391e95e576. A flaw was found in the amd64 implementation of the golang.org/x/crypto/salsa20 and golang.org/x/crypto/salsa20/salsa packages. If more than 256 GiB of keystream is generated, or if the counter otherwise grows greater than 32 bits, the amd64 implementation will first generate incorrect output, and then cycle back to previously generated keystream. Repeated keystream bytes can lead to loss of confidentiality in encryption applications, or to predictability in CSPRNG applications.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"An issue was discovered in the supplementary Go cryptography library, golang.org/x/crypto, before v0.0.0-20190320223903-b7391e95e576. A flaw was found in the amd64 implementation of the golang.org/x/crypto/salsa20 and golang.org/x/crypto/salsa20/salsa packages. If more than 256 GiB of keystream is generated, or if the counter otherwise grows greater than 32 bits, the amd64 implementation will first generate incorrect output, and then cycle back to previously generated keystream. Repeated keystream bytes can lead to loss of confidentiality in encryption applications, or to predictability in CSPRNG applications.","source":"cvelist"},{"lang":"en","text":"An issue was discovered in supplementary Go cryptography libraries, aka golang-googlecode-go-crypto, before 2019-03-20. A flaw was found in the amd64 implementation of golang.org/x/crypto/salsa20 and golang.org/x/crypto/salsa20/salsa. If more than 256 GiB of keystream is generated, or if the counter otherwise grows greater than 32 bits, the amd64 implementation will first generate incorrect output, and then cycle back to previously generated keystream. Repeated keystream bytes can lead to loss of confidentiality in encryption applications, or to predictability in CSPRNG applications.\n\n### Specific Go Packages Affected\ngolang.org/x/crypto/salsa20/salsa","format":"markdown","source":"ghsa"},{"lang":"en","text":"XORKeyStream generates incorrect and insecure output for very large inputs.\n\nIf more than 256 GiB of keystream is generated, or if the counter otherwise grows greater than 32 bits, the amd64 implementation will first generate incorrect output, and then cycle back to previously generated keystream. Repeated keystream bytes can lead to loss of confidentiality in encryption applications, or to predictability in CSPRNG applications.\n\nThe issue might affect uses of golang.org/x/crypto/nacl with extremely large messages.\n\nArchitectures other than amd64 and uses that generate less than 256 GiB of keystream for a single salsa20.XORKeyStream invocation are unaffected.","format":"markdown","source":"go"},{"lang":"es","text":"se descubrio un problema  en Go cryptography libraries, también se conoce como golang-googlecode-go-crypto, anterior del 20-03-2019. Se encontró un fallo en la implementación de amd64 de golang.org/x/crypto/salsa20 y golang.org/x/crypto/salsa20/salsa. Si se generan más de 256 GiB de keystream, o si el contador crece más de 32 bits, la implementación de amd64 causará primero una salida incorrecta y entonces volverá a la secuencia de claves generada previamente. Los bytes repetidos de keystream pueden provocar la pérdida de confidencialidad en las aplicaciones de encriptación o la previsibilidad en las aplicaciones CSPRNG.","source":"nvd"}],"published":"2019-05-09T00:00:00.000Z","modified":"2026-09-10T03:49:36.602Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:P/I:N/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-330"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.0.0-20190320223903-b7391e95e576"}],"ecosystem":"Go","package":"golang.org/x/crypto","purl":"pkg:golang/golang.org/x/crypto","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.0.0-20190320223903-b7391e95e576"}],"ecosystem":"Go","package":"golang.org/x/crypto","purl":"pkg:golang/golang.org/x/crypto","source":"go"},{"ranges":[],"vendor":"golang","product":"crypto","cpe":"cpe:2.3:a:golang:crypto:-:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"8.0"},{"status":"affected","version":"9.0"},{"status":"affected","version":"10.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://groups.google.com/forum/#%21msg/golang-announce/tjyNcJxb2vQ/n0NRBziSCAAJ","tags":["permissions-required","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=1691529","tags":["issue-tracking","vendor-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://go.googlesource.com/crypto/+/b7391e95e576cacdcdd422573063bc057239113d","tags":["fix","mailing-list","patch","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/golang/go/issues/30965","tags":["third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2019/06/msg00029.html","tags":["mailing-list","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2020/10/msg00014.html","tags":["mailing-list","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2020/11/msg00016.html","tags":["mailing-list","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2020/11/msg00030.html","tags":["mailing-list","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2021/01/msg00015.html","tags":["mailing-list","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/06/msg00017.html","tags":["mailing-list","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://pkg.go.dev/vuln/GO-2022-0209","tags":["third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2019-11840","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/golang/go","tags":["package"],"sources":["ghsa"]},{"url":"https://go.dev/cl/168406","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://go.dev/issue/30965","tags":["report","web"],"sources":["ghsa","go"]},{"url":"https://groups.google.com/forum/#!msg/golang-announce/tjyNcJxb2vQ/n0NRBziSCAAJ","tags":["web"],"sources":["ghsa"]},{"url":"https://groups.google.com/g/golang-announce/c/tjyNcJxb2vQ/m/n0NRBziSCAAJ","tags":["web"],"sources":["ghsa","go"]}],"credits":["Michael McLoughlin"],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2019-11840","url":"https://www.cve.org/CVERecord?id=CVE-2019-11840","licence":"CVE Terms of Use","modified":"2024-08-04T23:03:32.886Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-r5c5-pr8j-pfp7","url":"https://github.com/advisories/GHSA-r5c5-pr8j-pfp7","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:36.602Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2022-0209","url":"https://pkg.go.dev/vuln/GO-2022-0209","licence":"CC-BY-4.0","modified":"2026-02-04T04:34:27.332Z"},{"source":"nvd","name":"NVD","id":"CVE-2019-11840","url":"https://nvd.nist.gov/vuln/detail/CVE-2019-11840","licence":"Public domain","modified":"2026-06-17T02:13:43.400Z"}],"updatedAt":"2026-11-25T22:57:44.740Z","epss":{"score":0.03452,"percentile":0.8932,"date":"2026-12-01T12:00:22.000Z"}}