CVE-2021-47154: Permissive Ip Octet Validation

A permissive regular expression is used to validate IPv4 octets. By not restricting leading zeros, standard network parsers may treat the octet as octal while this validation treats it as decimal. This interpretation conflict can lead to SSRF or access control bypasses. Ensure that IPv4 octets with leading zeros are explicitly rejected or properly validated

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Generic
greprules fetch cve-2021-47154-permissive-ip-octet-validation --engine opengrep

Description

A permissive regular expression is used to validate IPv4 octets. By not restricting leading zeros, standard network parsers may treat the octet as octal while this validation treats it as decimal. This interpretation conflict can lead to SSRF or access control bypasses. Ensure that IPv4 octets with leading zeros are explicitly rejected or properly validated