CVE-2026-43975: Java Torealpath Broad Catch Traversal Bypass

Catching a generic `IOException` or `Exception` when calling `toRealPath()` and falling back to `normalize()` can mask symlink validation errors (e.g., AccessDeniedException). If `toRealPath()` fails due to an access exception on a symlink, the fallback path will circumvent symlink resolution, leading to directory traversal vulnerabilities. Catch `NoSuchFile

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Java
greprules fetch cve-2026-43975-java-torealpath-broad-catch-traversal-bypass --engine opengrep

Description

Catching a generic `IOException` or `Exception` when calling `toRealPath()` and falling back to `normalize()` can mask symlink validation errors (e.g., AccessDeniedException). If `toRealPath()` fails due to an access exception on a symlink, the fallback path will circumvent symlink resolution, leading to directory traversal vulnerabilities. Catch `NoSuchFile