Bug 1978755 (CVE-2021-21705)

Summary: CVE-2021-21705 php: SSRF bypass in FILTER_VALIDATE_URL
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: fedora, hhorak, jorton, rcollet
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: php 7.3.29, php 7.4.21, php 8.0.8 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in php. Currently, php's FILTER_VALIDATE_URL check doesn't recognize some non-compliant RFC 3986 URLs and returns them as valid. This flaw allows an attacker to craft URLs, which depending on how the URL filter checking is used on the application side, lead to Server Side Request Forgery. This issue presents an integrity risk for the application, as eventually, the attacker can manipulate resources that shouldn't be fully available for users.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-03 13:07:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1978756, 1981421, 1981422, 1981423, 1981424, 1986282    
Bug Blocks: 1978792    

Description Guilherme de Almeida Suckevicz 2021-07-02 16:18:12 UTC
A security issue was found in PHP in the way it allows to bypass the FILTER_VALIDATE_URL check via a crafted URL which may lead to SSRF.

Reference:
https://bugs.php.net/bug.php?id=81122

Comment 1 Guilherme de Almeida Suckevicz 2021-07-02 16:18:30 UTC
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1978756]

Comment 5 Marco Benatto 2021-07-12 14:34:52 UTC
Currently php's FILTER_VALIDATE_URL check doesn't recognize some non-compliant RFC 3986 URLs and returns it as valid. This allows an attacker to craft URLs, which depending on how the URL filter checking is used in the application side, lead to Server Side Request Forgery.

Comment 6 errata-xmlrpc 2021-08-03 09:15:58 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS

Via RHSA-2021:2992 https://access.redhat.com/errata/RHSA-2021:2992

Comment 7 Product Security DevOps Team 2021-08-03 13:07:13 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2021-21705

Comment 8 errata-xmlrpc 2022-05-10 14:23:24 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2022:1935 https://access.redhat.com/errata/RHSA-2022:1935