CVE-2026-49157: Insecure Dynamic Class Instantiation

Dynamically loading and instantiating classes without type validation can lead to Remote Code Execution (RCE). Ensure that dynamically resolved classes are validated against expected types before invoking `newInstance()`.

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Java
greprules fetch cve-2026-49157-insecure-dynamic-class-instantiation --engine opengrep

Description

Dynamically loading and instantiating classes without type validation can lead to Remote Code Execution (RCE). Ensure that dynamically resolved classes are validated against expected types before invoking `newInstance()`.