Security vulnerability in Apache bRPC <1.5.0 on all platforms allows attackers to execute arbitrary code via ServerOptions::pidfile. An attacker that can influence the ServerOptions pidfile parameter with which the bRPC server is started can execute arbitrary code with the permissions of the bRPC process.
Solution: 1. 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/ 2. 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
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-31039.json"
[
{
"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",
"source": "https://github.com/apache/brpc/commit/8cc57b0c4544900cf91cb3e87451531ebb02f49a",
"target": {
"file": "src/brpc/server.cpp"
},
"deprecated": false,
"signature_version": "v1"
},
{
"digest": {
"function_hash": "175043439735115882979131555496314714499",
"length": 295.0
},
"id": "CVE-2023-31039-b317bab0",
"signature_type": "Function",
"source": "https://github.com/apache/brpc/commit/8cc57b0c4544900cf91cb3e87451531ebb02f49a",
"target": {
"function": "ExpandPath",
"file": "src/brpc/server.cpp"
},
"deprecated": false,
"signature_version": "v1"
},
{
"digest": {
"function_hash": "150646807458817649632601869261475714540",
"length": 1084.0
},
"id": "CVE-2023-31039-d443e4cc",
"signature_type": "Function",
"source": "https://github.com/apache/brpc/commit/8cc57b0c4544900cf91cb3e87451531ebb02f49a",
"target": {
"function": "Server::PutPidFileIfNeeded",
"file": "src/brpc/server.cpp"
},
"deprecated": false,
"signature_version": "v1"
}
]