CVE-2026-25518: Unchecked Dns Message Slice Cast
Direct index access and unchecked type assertion on a DNS message slice (e.g., `Answer`, `Ns`, `Extra`) can result in out-of-bounds access or type assertion panics if the DNS response is modified, empty, or contains unexpected record types. Iterate over the slice and use a comma-ok type assertion instead.
Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Goβ
greprules fetch cve-2026-25518-unchecked-dns-message-slice-cast --engine opengrepDescription
Direct index access and unchecked type assertion on a DNS message slice (e.g., `Answer`, `Ns`, `Extra`) can result in out-of-bounds access or type assertion panics if the DNS response is modified, empty, or contains unexpected record types. Iterate over the slice and use a comma-ok type assertion instead.
Community feedback
0 signals from signed-in users.
- Useful
- 0
- False positive
- 0
- Metadata
- 0