{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2023-39631","id":"CVE-2023-39631","title":"Langchain vulnerable to arbitrary code execution via the evaluate function in the numexpr library","description":"An issue in LanChain-ai Langchain v.0.0.245 allows a remote attacker to execute arbitrary code via the evaluate function in the numexpr library.","descriptionLong":"An issue in LanChain-ai Langchain v.0.0.245 allows a remote attacker to execute arbitrary code via the evaluate function in the numexpr library.","published":"2023-09-01T00:00:00.000Z","updated":"2026-10-28T02:31:13.833491512Z","reserved":"2023-08-07T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"mitre","metric":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},"metrics":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"GitHub"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"OSV"}],"rating":"critical","products":[],"affectedProducts":[{"vendor":"n/a","product":"n/a","defaultStatus":null,"versions":[{"version":"n/a","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"langchain","purl":"pkg:pypi/langchain","ranges":["<0.0.308"],"fixed":["0.0.308"],"advisory":"GHSA-f73w-4m7g-ch9x"},{"ecosystem":"PyPI","name":"numexpr","purl":"pkg:pypi/numexpr","ranges":["<2.8.5"],"fixed":["2.8.5"],"advisory":"GHSA-f73w-4m7g-ch9x"}],"cwes":["CWE-94"],"aliases":["GHSA-f73w-4m7g-ch9x","PYSEC-2023-162","PYSEC-2023-163"],"references":[{"url":"https://github.com/langchain-ai/langchain/issues/8363","tags":["x_transferred","Exploit","Issue Tracking","Patch","Third Party Advisory","report","web","evidence","fix"]},{"url":"https://github.com/pydata/numexpr/issues/442","tags":["x_transferred","Exploit","Issue Tracking","Patch","Third Party Advisory","report","web","fix","evidence"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/39xxx/CVE-2023-39631.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-39631","tags":["advisory"]},{"url":"https://github.com/langchain-ai/langchain/pull/11302","tags":["web","fix"]},{"url":"https://github.com/pydata/numexpr/commit/4b2d89cf14e75030d27629925b9998e1e91d23c7","tags":["web"]},{"url":"https://github.com/langchain-ai/langchain","tags":["package"]},{"url":"https://github.com/langchain-ai/langchain/releases/tag/v0.0.308","tags":["web"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2023-162.yaml","tags":["web"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/numexpr/PYSEC-2023-163.yaml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-f73w-4m7g-ch9x","tags":["advisory"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total"},"epss":0.016,"epssPercentile":0.76309,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2023-39631","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-39631","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2023-39631","ok":true,"note":"2 packages"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-f73w-4m7g-ch9x","ok":true,"note":"GHSA-f73w-4m7g-ch9x"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2023-39631","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}