CVE-2025-62162: Unvalidated Ast Deref Visitor

AST node visitors unconditionally delegate via `self.deref().accept()` without checking for Error variants. This may cause panics during traversal of malformed input, leading to a Denial of Service condition. Ensure the delegation logic wraps the call in an Error variant check (e.g., `if !matches!(self, Type::Error(_))`).

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Rust
greprules fetch cve-2025-62162-unvalidated-ast-deref-visitor --engine opengrep

Description

AST node visitors unconditionally delegate via `self.deref().accept()` without checking for Error variants. This may cause panics during traversal of malformed input, leading to a Denial of Service condition. Ensure the delegation logic wraps the call in an Error variant check (e.g., `if !matches!(self, Type::Error(_))`).