Security vulnerability in Apache bRPC <1.5.0 on all platforms allows attackers to execute arbitrary code via ServerOptions::pid_file. An 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.
Solution:
{
"cna_assigner": "apache",
"cwe_ids": [
"CWE-20"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/31xxx/CVE-2023-31039.json",
"unresolved_ranges": [
{
"extracted_events": [
{
"introduced": "0.9.0"
},
{
"fixed": "1.5.0"
}
],
"source": "AFFECTED_FIELD"
}
]
}"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-31039.json"
[
{
"deprecated": false,
"digest": {
"line_hashes": [
"113223119815103006079442882938257788249",
"197047643380007642698634854981821810251",
"126443456836990426104568351371586774820",
"94023981011465621744173603143537333339",
"97299279264271241754090730910818281156",
"154851386772820354811691599084199893864",
"11825115508327147556853114005747906380",
"15774188769740441394737251091845847863",
"15568234137415803825814341972529025983",
"86211188613911946678087489672938102171",
"289116761178903481224964909010042310837",
"92176286368397795037323348006181153834",
"187919328957912494527785146128704935586",
"212020285792247846398663863330291242736",
"130370947365274387808280540294198061661",
"227186236579854822205497010203917858915",
"198944111492303735207053939324197074634",
"170994123086570946120227904005005676989",
"249516424056323217968893634365133336346",
"297018045885237104906141326297391490603"
],
"threshold": 0.9
},
"id": "CVE-2023-31039-67802322",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/apache/brpc/commit/8cc57b0c4544900cf91cb3e87451531ebb02f49a",
"target": {
"file": "src/brpc/server.cpp"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "175043439735115882979131555496314714499",
"length": 295
},
"id": "CVE-2023-31039-b317bab0",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/apache/brpc/commit/8cc57b0c4544900cf91cb3e87451531ebb02f49a",
"target": {
"file": "src/brpc/server.cpp",
"function": "ExpandPath"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "150646807458817649632601869261475714540",
"length": 1084
},
"id": "CVE-2023-31039-d443e4cc",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/apache/brpc/commit/8cc57b0c4544900cf91cb3e87451531ebb02f49a",
"target": {
"file": "src/brpc/server.cpp",
"function": "Server::PutPidFileIfNeeded"
}
}
]
"2026-08-12T14:51:59Z"