{
    "data_version": "4.0",
    "data_type": "CVE",
    "data_format": "MITRE",
    "CVE_data_meta": {
        "ID": "CVE-2023-31039",
        "ASSIGNER": "security@apache.org",
        "STATE": "PUBLIC"
    },
    "description": {
        "description_data": [
            {
                "lang": "eng",
                "value": "Security vulnerability\u00a0in 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:\u00a0 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:\u00a0 https://github.com/apache/brpc/pull/2218 https://github.com/apache/brpc/pull/2218 "
            }
        ]
    },
    "problemtype": {
        "problemtype_data": [
            {
                "description": [
                    {
                        "lang": "eng",
                        "value": "CWE-20 Improper Input Validation",
                        "cweId": "CWE-20"
                    }
                ]
            }
        ]
    },
    "affects": {
        "vendor": {
            "vendor_data": [
                {
                    "vendor_name": "Apache Software Foundation",
                    "product": {
                        "product_data": [
                            {
                                "product_name": "Apache bRPC",
                                "version": {
                                    "version_data": [
                                        {
                                            "version_affected": "<",
                                            "version_name": "0.9.0",
                                            "version_value": "1.5.0"
                                        }
                                    ]
                                }
                            }
                        ]
                    }
                }
            ]
        }
    },
    "references": {
        "reference_data": [
            {
                "url": "https://lists.apache.org/thread/jqpttrqbc38yhckgp67xk399hqxnz7jn",
                "refsource": "MISC",
                "name": "https://lists.apache.org/thread/jqpttrqbc38yhckgp67xk399hqxnz7jn"
            },
            {
                "url": "http://www.openwall.com/lists/oss-security/2023/05/08/1",
                "refsource": "MISC",
                "name": "http://www.openwall.com/lists/oss-security/2023/05/08/1"
            }
        ]
    },
    "generator": {
        "engine": "Vulnogram 0.1.0-dev"
    },
    "source": {
        "discovery": "UNKNOWN"
    },
    "configuration": [
        {
            "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"
        }
    ],
    "work_around": [
        {
            "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:\u00a0 https://github.com/apache/brpc/pull/2218 https://github.com/apache/brpc/pull/2218 \n\n"
        }
    ]
}