Bug 2261887 (CVE-2024-23334) - CVE-2024-23334 aiohttp: follow_symlinks directory traversal vulnerability
Summary: CVE-2024-23334 aiohttp: follow_symlinks directory traversal vulnerability
Keywords:
Status: NEW
Alias: CVE-2024-23334
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2261893 2261894 2261895 2261896 2261891 2261892 2261899 2261900 2261901 2261902 2266047
Blocks: 2261888
TreeView+ depends on / blocked
 
Reported: 2024-01-30 09:03 UTC by Mauro Matteo Cascella
Modified: 2024-04-23 17:17 UTC (History)
43 users (show)

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.
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2024:1536 0 None None None 2024-03-27 13:19:14 UTC
Red Hat Product Errata RHSA-2024:1640 0 None None None 2024-04-02 19:30:32 UTC
Red Hat Product Errata RHSA-2024:1878 0 None None None 2024-04-18 01:52:11 UTC
Red Hat Product Errata RHSA-2024:2010 0 None None None 2024-04-23 17:17:41 UTC

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


Note You need to log in before you can comment on or make changes to this bug.