Bug 2261887 (CVE-2024-23334)

Summary: CVE-2024-23334 aiohttp: follow_symlinks directory traversal vulnerability
Product: [Other] Security Response Reporter: Mauro Matteo Cascella <mcascell>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: adudiak, bbuckingham, bcourt, caswilli, davidn, dfreiber, drow, ehelms, epacific, gtanzill, hkataria, jburrell, jcammara, jhardy, jmitchel, jneedle, jobarker, jsherril, jtanner, kaycoth, kshier, lzap, mabashia, mhulan, mminar, nmoumoul, orabin, osapryki, pcreech, psegedy, rbiba, rbobbitt, rchan, simaishi, smcdonal, sskracic, stcannon, teagle, tfister, tsasak, vkumar, yguenane, zsadeh
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: aiohttp 3.9.2 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in aiohttp. When using aiohttp as a web server and configuring static routes, it is necessary to specify the root path for static files. Additionally, the option 'follow_symlinks' can be used to determine whether to follow symbolic links outside the static root directory. When 'follow_symlinks' is set to True, there is no validation to check if a given file path is within the root directory. This issue can lead to a directory traversal vulnerability, resulting in unauthorized access to arbitrary files on the system, even when symlinks are not present.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2261893, 2261894, 2261895, 2261896, 2261891, 2261892, 2261899, 2261900, 2261901, 2261902, 2266047    
Bug Blocks: 2261888    

Description Mauro Matteo Cascella 2024-01-30 09:03:36 UTC
aiohttp is an asynchronous HTTP client/server framework for asyncio and Python. When using aiohttp as a web server and configuring static routes, it is necessary to specify the root path for static files. Additionally, the option 'follow_symlinks' can be used to determine whether to follow symbolic links outside the static root directory. When 'follow_symlinks' is set to True, there is no validation to check if reading a file is within the root directory. This can lead to directory traversal vulnerabilities, resulting in unauthorized access to arbitrary files on the system, even when symlinks are not present. Disabling follow_symlinks and using a reverse proxy are encouraged mitigations.  Version 3.9.2 fixes this issue.

References:
https://github.com/aio-libs/aiohttp/security/advisories/GHSA-5h86-8mv2-jq9f
https://github.com/aio-libs/aiohttp/commit/1c335944d6a8b1298baf179b7c0b3069f10c514b
https://github.com/aio-libs/aiohttp/pull/8079

Comment 1 Mauro Matteo Cascella 2024-01-30 09:34:45 UTC
Created python-aiohttp tracking bugs for this issue:

Affects: epel-all [bug 2261892]
Affects: fedora-all [bug 2261891]


Created python-gcsfs tracking bugs for this issue:

Affects: fedora-all [bug 2261894]


Created python-idna-ssl tracking bugs for this issue:

Affects: epel-all [bug 2261893]
Affects: fedora-all [bug 2261895]


Created python-pytelegrambotapi tracking bugs for this issue:

Affects: fedora-all [bug 2261896]

Comment 4 errata-xmlrpc 2024-03-27 13:19:12 UTC
This issue has been addressed in the following products:

  Red Hat Satellite 6.14 for RHEL 8

Via RHSA-2024:1536 https://access.redhat.com/errata/RHSA-2024:1536

Comment 5 errata-xmlrpc 2024-04-02 19:30:28 UTC
This issue has been addressed in the following products:

  Red Hat Ansible Automation Platform 2.4 for RHEL 9
  Red Hat Ansible Automation Platform 2.4 for RHEL 8

Via RHSA-2024:1640 https://access.redhat.com/errata/RHSA-2024:1640

Comment 7 errata-xmlrpc 2024-04-18 01:52:08 UTC
This issue has been addressed in the following products:

  RHUI 4 for RHEL 8

Via RHSA-2024:1878 https://access.redhat.com/errata/RHSA-2024:1878

Comment 8 errata-xmlrpc 2024-04-23 17:17:38 UTC
This issue has been addressed in the following products:

  Red Hat Satellite 6.15 for RHEL 8

Via RHSA-2024:2010 https://access.redhat.com/errata/RHSA-2024:2010