{
  "id": "CVE-2026-31413",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-31413",
  "published_at": "2026-04-12T05:36:14.632Z",
  "title": "bpf: Fix unsound scalar forking in maybe_fork_scalars() for BPF_OR",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": {
    "created_at": "2026-04-12T10:41:02Z",
    "first_seen_at": "2026-11-14T11:25:11.578Z",
    "days_after_publication": 0.2,
    "repo": "Rat5ak/CVE-2026-31413-BPF-Container-Escape",
    "source": "github"
  },
  "poc_repo_count": 1,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix unsound scalar forking in maybe_fork_scalars() for BPF_OR\n\nmaybe_fork_scalars() is called for both BPF_AND and BPF_OR when the\nsource operand is a constant.  When dst has signed range [-1, 0], it\nforks the verifier state: the pushed path gets dst = 0, the current\npath gets dst = -1.\n\nFor BPF_AND this is correct: 0 \u0026 K == 0.\nFor BPF_OR this is wrong:    0 | K == K, not 0.\n\nThe pushed path therefore tracks dst as 0 when the runtime value is K,\nproducing an exploitable verifier/runtime divergence that allows\nout-of-bounds map access.\n\nFix this by passing env-\u003einsn_idx (instead of env-\u003einsn_idx + 1) to\npush_stack(), so the pushed path re-executes the ALU instruction with\ndst = 0 and naturally computes the correct result for any opcode.",
  "cwe": "CWE-125",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.8
  },
  "repos": [
    {
      "repo": "Rat5ak/CVE-2026-31413-BPF-Container-Escape",
      "url": "https://github.com/Rat5ak/CVE-2026-31413-BPF-Container-Escape",
      "created_at": "2026-04-12T10:41:02Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 1,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2021-10-28T09:32:54Z"
    }
  ],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= dea9989a3f3961faede93752cd81eb5a9514d911, \u003c 342aa1ee995ef5bbf876096dc3a5e51218d76fa4",
          "\u003e= 4c122e8ae14950cf6b59d208fc5160f7c601e746, \u003c 58bd87d0e69204dbd739e4387a1edb0c4b1644e7",
          "\u003e= e52567173ba86dbffb990595fbe60e2e83899372, \u003c d13281ae7ea8902b21d99d10a2c8caf0bdec0455",
          "\u003e= bffacdb80b93b7b5e96b26fad64cc490a6c7d6c7, \u003c c845894ebd6fb43226b3118d6b017942550910c5"
        ],
        "fixed_in": [
          "342aa1ee995ef5bbf876096dc3a5e51218d76fa4",
          "58bd87d0e69204dbd739e4387a1edb0c4b1644e7",
          "d13281ae7ea8902b21d99d10a2c8caf0bdec0455",
          "c845894ebd6fb43226b3118d6b017942550910c5"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 6.12.75, \u003c 6.12.80",
          "\u003e= 6.18.16, \u003c 6.18.21",
          "\u003e= 6.19.6, \u003c 6.19.11"
        ],
        "fixed_in": [
          "6.12.80",
          "6.18.21",
          "6.19.11"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 342aa1ee995ef5bbf876096dc3a5e51218d76fa4 or 58bd87d0e69204dbd739e4387a1edb0c4b1644e7 or d13281ae7ea8902b21d99d10a2c8caf0bdec0455 or c845894ebd6fb43226b3118d6b017942550910c5 or later.",
      "Upgrade Linux to 6.12.80 or 6.18.21 or 6.19.11 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
