{"id":"CVE-2023-31039","state":"PUBLISHED","title":"Apache bRPC: ServerOptions.pid_file may cause arbitrary code execution","description":"Security vulnerability in Apache bRPC <1.5.0 on all platforms allows attackers to execute arbitrary code via ServerOptions::pid_file.\nAn attacker that can influence the ServerOptions pid_file parameter with which the bRPC server is started can execute arbitrary code with the permissions of the bRPC process.\n\nSolution:\n1. upgrade to bRPC >= 1.5.0, download link:  https://dist.apache.org/repos/dist/release/brpc/1.5.0/ https://dist.apache.org/repos/dist/release/brpc/1.5.0/ \n2. If you are using an old version of bRPC and hard to upgrade, you can apply this patch:  https://github.com/apache/brpc/pull/2218 https://github.com/apache/brpc/pull/2218","publishedAt":"2023-05-08T08:57:14.714Z","updatedAt":"2025-02-13T16:49:42.005Z","severity":{"score":9.8,"label":"Critical","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"CISA-ADP"},"assigner":"apache","products":["Apache Software Foundation Apache bRPC"],"affected":[{"vendor":"Apache Software Foundation","product":"Apache bRPC","defaultStatus":"unaffected","versions":[{"version":"0.9.0","status":"affected","lessThan":"1.5.0","versionType":"semver"}]}],"references":["https://lists.apache.org/thread/jqpttrqbc38yhckgp67xk399hqxnz7jn","http://www.openwall.com/lists/oss-security/2023/05/08/1"],"weaknesses":["CWE-20"],"ingestedAt":"2026-10-29T20:06:00.499Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/31xxx/CVE-2023-31039.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2023-31039","state":"PUBLISHED","datePublished":"2023-05-08T08:57:14.714Z","dateUpdated":"2025-02-13T16:49:42.005Z","assignerShortName":"apache","assignerOrgId":"f0158376-9dc2-43b6-827c-5f631a4d8d09","dateReserved":"2023-04-23T03:28:24.815Z"},"containers":{"cna":{"title":"Apache bRPC: ServerOptions.pid_file may cause arbitrary code execution","descriptions":[{"lang":"en","value":"Security vulnerability in Apache bRPC <1.5.0 on all platforms allows attackers to execute arbitrary code via ServerOptions::pid_file.\nAn attacker that can influence the ServerOptions pid_file parameter with which the bRPC server is started can execute arbitrary code with the permissions of the bRPC process.\n\nSolution:\n1. upgrade to bRPC >= 1.5.0, download link:  https://dist.apache.org/repos/dist/release/brpc/1.5.0/ https://dist.apache.org/repos/dist/release/brpc/1.5.0/ \n2. If you are using an old version of bRPC and hard to upgrade, you can apply this patch:  https://github.com/apache/brpc/pull/2218 https://github.com/apache/brpc/pull/2218"}],"affected":[{"vendor":"Apache Software Foundation","product":"Apache bRPC","defaultStatus":"unaffected","versions":[{"version":"0.9.0","status":"affected","lessThan":"1.5.0","versionType":"semver"}]}],"references":[{"url":"https://lists.apache.org/thread/jqpttrqbc38yhckgp67xk399hqxnz7jn","tags":["vendor-advisory"]},{"url":"http://www.openwall.com/lists/oss-security/2023/05/08/1"}],"metrics":[{"other":{"content":{"text":"important"},"type":"Textual description of severity"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-20","description":"CWE-20 Improper Input Validation","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"apache","orgId":"f0158376-9dc2-43b6-827c-5f631a4d8d09","dateUpdated":"2023-05-08T09:00:10.355Z"},"configurations":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"set brpc::ServerOptions::pid_file from user input"}],"value":"set brpc::ServerOptions::pid_file from user input"}],"source":{"discovery":"UNKNOWN"},"workarounds":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"Apply this patch:&nbsp;<a target=\"_blank\" rel=\"nofollow\" href=\"https://github.com/apache/brpc/pull/2218\">https://github.com/apache/brpc/pull/2218</a><br><br>"}],"value":"Apply this patch:  https://github.com/apache/brpc/pull/2218 https://github.com/apache/brpc/pull/2218"}],"x_generator":{"engine":"Vulnogram 0.1.0-dev"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://lists.apache.org/thread/jqpttrqbc38yhckgp67xk399hqxnz7jn","tags":["vendor-advisory","x_transferred"]},{"url":"http://www.openwall.com/lists/oss-security/2023/05/08/1","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T14:45:25.629Z"}},{"title":"CISA ADP Vulnrichment","affected":[{"vendor":"apache","product":"brpc","defaultStatus":"unknown","versions":[{"version":"0.9.0","status":"affected","lessThan":"1.5.0","versionType":"custom"}],"cpes":["cpe:2.3:a:apache:brpc:*:*:*:*:*:*:*:*"]}],"metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":9.8,"attackVector":"NETWORK","baseSeverity":"CRITICAL","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"NONE","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"timestamp":"2024-10-15T18:24:41.780912Z","id":"CVE-2023-31039","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-10-15T18:25:30.954Z"}}]}}}