{
  "containers": {
    "cna": {
      "providerMetadata": {
        "orgId": "f0158376-9dc2-43b6-827c-5f631a4d8d09"
      },
      "title": "ServerOptions.pid_file may cause arbitrary code execution",
      "problemTypes": [
        {
          "descriptions": [
            {
              "description": "CWE-20 Improper Input Validation",
              "lang": "en",
              "cweId": "CWE-20",
              "type": "CWE"
            }
          ]
        }
      ],
      "source": {
        "discovery": "UNKNOWN"
      },
      "affected": [
        {
          "vendor": "Apache Software Foundation",
          "product": "Apache bRPC",
          "versions": [
            {
              "status": "affected",
              "version": "0.9.0",
              "lessThan": "1.5.0",
              "versionType": "semver"
            }
          ],
          "defaultStatus": "unaffected"
        }
      ],
      "descriptions": [
        {
          "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 ",
          "lang": "en",
          "supportingMedia": [
            {
              "type": "text/html",
              "base64": false,
              "value": "<span style=\"background-color: rgb(255, 255, 255);\">Security vulnerability&nbsp;</span>in Apache bRPC &lt;1.5.0 on all platforms allows attackers to execute arbitrary code via ServerOptions::pid_file.<br>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.<br><br>Solution:<br>1. upgrade to bRPC &gt;= 1.5.0, download link:&nbsp;<a target=\"_blank\" rel=\"nofollow\" href=\"https://dist.apache.org/repos/dist/release/brpc/1.5.0/\">https://dist.apache.org/repos/dist/release/brpc/1.5.0/</a><br>2. If you are using an old version of bRPC and hard to upgrade, you can 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>"
            }
          ]
        }
      ],
      "references": [
        {
          "url": "https://lists.apache.org/thread/jqpttrqbc38yhckgp67xk399hqxnz7jn",
          "tags": [
            "vendor-advisory"
          ]
        }
      ],
      "metrics": [
        {
          "other": {
            "type": "Textual description of severity",
            "content": {
              "text": "important"
            }
          }
        }
      ],
      "configurations": [
        {
          "lang": "en",
          "value": "set brpc::ServerOptions::pid_file from user input",
          "supportingMedia": [
            {
              "type": "text/html",
              "base64": false,
              "value": "set brpc::ServerOptions::pid_file from user input"
            }
          ]
        }
      ],
      "workarounds": [
        {
          "lang": "en",
          "value": "Apply this patch:\u00a0 https://github.com/apache/brpc/pull/2218 https://github.com/apache/brpc/pull/2218 \n\n",
          "supportingMedia": [
            {
              "type": "text/html",
              "base64": false,
              "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>"
            }
          ]
        }
      ],
      "x_generator": {
        "engine": "Vulnogram 0.1.0-dev"
      }
    }
  },
  "cveMetadata": {
    "cveId": "CVE-2023-31039",
    "assignerOrgId": "f0158376-9dc2-43b6-827c-5f631a4d8d09",
    "serial": 1,
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.0"
}