{"api_version":"1","generated_at":"2026-04-25T13:02:32+00:00","cve":"CVE-2026-31681","urls":{"html":"https://cve.report/CVE-2026-31681","api":"https://cve.report/api/cve/CVE-2026-31681.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-31681","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-31681"},"summary":{"title":"netfilter: xt_multiport: validate range encoding in checkentry","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnetfilter: xt_multiport: validate range encoding in checkentry\n\nports_match_v1() treats any non-zero pflags entry as the start of a\nport range and unconditionally consumes the next ports[] element as\nthe range end.\n\nThe checkentry path currently validates protocol, flags and count, but\nit does not validate the range encoding itself. As a result, malformed\nrules can mark the last slot as a range start or place two range starts\nback to back, leaving ports_match_v1() to step past the last valid\nports[] element while interpreting the rule.\n\nReject malformed multiport v1 rules in checkentry by validating that\neach range start has a following element and that the following element\nis not itself marked as another range start.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-04-25 09:16:01","updated_at":"2026-04-25 09:16:01"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/8368ce8eb01f0b91111d814703696e780d0ef12f","name":"https://git.kernel.org/stable/c/8368ce8eb01f0b91111d814703696e780d0ef12f","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/aec14808271f2bf2b656de6ff12dfe73c5fd3b67","name":"https://git.kernel.org/stable/c/aec14808271f2bf2b656de6ff12dfe73c5fd3b67","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/1e4baa853f1cc4227e04f52d6860524707cfb294","name":"https://git.kernel.org/stable/c/1e4baa853f1cc4227e04f52d6860524707cfb294","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/ff64c5bfef12461df8450e0f50bb693b5269c720","name":"https://git.kernel.org/stable/c/ff64c5bfef12461df8450e0f50bb693b5269c720","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-31681","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31681","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected a89ecb6a2ef732d04058d87801e2b6bd7e5c7089 aec14808271f2bf2b656de6ff12dfe73c5fd3b67 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected a89ecb6a2ef732d04058d87801e2b6bd7e5c7089 8368ce8eb01f0b91111d814703696e780d0ef12f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected a89ecb6a2ef732d04058d87801e2b6bd7e5c7089 1e4baa853f1cc4227e04f52d6860524707cfb294 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected a89ecb6a2ef732d04058d87801e2b6bd7e5c7089 ff64c5bfef12461df8450e0f50bb693b5269c720 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2.6.17","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 2.6.17 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.83 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.24 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.19.14 6.19.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.0 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["net/netfilter/xt_multiport.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"aec14808271f2bf2b656de6ff12dfe73c5fd3b67","status":"affected","version":"a89ecb6a2ef732d04058d87801e2b6bd7e5c7089","versionType":"git"},{"lessThan":"8368ce8eb01f0b91111d814703696e780d0ef12f","status":"affected","version":"a89ecb6a2ef732d04058d87801e2b6bd7e5c7089","versionType":"git"},{"lessThan":"1e4baa853f1cc4227e04f52d6860524707cfb294","status":"affected","version":"a89ecb6a2ef732d04058d87801e2b6bd7e5c7089","versionType":"git"},{"lessThan":"ff64c5bfef12461df8450e0f50bb693b5269c720","status":"affected","version":"a89ecb6a2ef732d04058d87801e2b6bd7e5c7089","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["net/netfilter/xt_multiport.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"2.6.17"},{"lessThan":"2.6.17","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.83","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.24","versionType":"semver"},{"lessThanOrEqual":"6.19.*","status":"unaffected","version":"6.19.14","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.0","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.83","versionStartIncluding":"2.6.17","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.24","versionStartIncluding":"2.6.17","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.19.14","versionStartIncluding":"2.6.17","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.0","versionStartIncluding":"2.6.17","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnetfilter: xt_multiport: validate range encoding in checkentry\n\nports_match_v1() treats any non-zero pflags entry as the start of a\nport range and unconditionally consumes the next ports[] element as\nthe range end.\n\nThe checkentry path currently validates protocol, flags and count, but\nit does not validate the range encoding itself. As a result, malformed\nrules can mark the last slot as a range start or place two range starts\nback to back, leaving ports_match_v1() to step past the last valid\nports[] element while interpreting the rule.\n\nReject malformed multiport v1 rules in checkentry by validating that\neach range start has a following element and that the following element\nis not itself marked as another range start."}],"providerMetadata":{"dateUpdated":"2026-04-25T08:46:57.995Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/aec14808271f2bf2b656de6ff12dfe73c5fd3b67"},{"url":"https://git.kernel.org/stable/c/8368ce8eb01f0b91111d814703696e780d0ef12f"},{"url":"https://git.kernel.org/stable/c/1e4baa853f1cc4227e04f52d6860524707cfb294"},{"url":"https://git.kernel.org/stable/c/ff64c5bfef12461df8450e0f50bb693b5269c720"}],"title":"netfilter: xt_multiport: validate range encoding in checkentry","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-31681","datePublished":"2026-04-25T08:46:57.995Z","dateReserved":"2026-03-09T15:48:24.130Z","dateUpdated":"2026-04-25T08:46:57.995Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-04-25 09:16:01","lastModifiedDate":"2026-04-25 09:16:01","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"31681","Ordinal":"1","Title":"netfilter: xt_multiport: validate range encoding in checkentry","CVE":"CVE-2026-31681","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"31681","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nnetfilter: xt_multiport: validate range encoding in checkentry\n\nports_match_v1() treats any non-zero pflags entry as the start of a\nport range and unconditionally consumes the next ports[] element as\nthe range end.\n\nThe checkentry path currently validates protocol, flags and count, but\nit does not validate the range encoding itself. As a result, malformed\nrules can mark the last slot as a range start or place two range starts\nback to back, leaving ports_match_v1() to step past the last valid\nports[] element while interpreting the rule.\n\nReject malformed multiport v1 rules in checkentry by validating that\neach range start has a following element and that the following element\nis not itself marked as another range start.","Type":"Description","Title":"netfilter: xt_multiport: validate range encoding in checkentry"}]}}}