Bug 1190703 - (CVE-2021-40438) VUL-0: CVE-2021-40438: apache2: httpd: mod_proxy: SSRF via a crafted request uri-path
(CVE-2021-40438)
VUL-0: CVE-2021-40438: apache2: httpd: mod_proxy: SSRF via a crafted request ...
Status: NEW
Classification: Novell Products
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents
unspecified
Other Other
: P3 - Medium : Major
: ---
Assigned To: Security Team bot
Security Team bot
https://smash.suse.de/issue/310288/
CVSSv3.1:SUSE:CVE-2021-40438:7.5:(AV:...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-09-21 10:39 UTC by Gabriele Sonnu
Modified: 2022-01-05 12:35 UTC (History)
3 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gabriele Sonnu 2021-09-21 10:39:24 UTC
A crafted request uri-path can cause mod_proxy to forward the request to an origin server choosen by the remote user. This issue affects Apache HTTP Server 2.4.48 and earlier.

Reference:
https://httpd.apache.org/security/vulnerabilities_24.html

References:
https://bugzilla.redhat.com/show_bug.cgi?id=2005117
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-40438
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-40438
https://httpd.apache.org/security/vulnerabilities_24.html
Comment 1 Petr Gajdos 2021-09-22 11:09:57 UTC
From: Yann Ylavic <ylavic.dev@gmail.com>
Date: Wed, 22 Sep 2021 11:48:29 +0200
Message-ID: <CAKQ1sVNOcUiJR2L4DuhoGJJSESz7Y-=7djx2OEi_z5E_Sm9ZDw@mail.gmail.com>
Subject: Re: CVE-2021-40438
To: pgajdos <pgajdos@suse.cz>
Content-Type: text/plain; charset="UTF-8"

Hi Petr

>
> sorry for contacting you again, I failed to understand which commit(s)
> are intended to fix this CVE. Could you please help?

The minimal fix is this one: https://svn.apache.org/r1892874
(or even the "proxy_util.c" part only:
https://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/proxy_util.c?r1=1892874&r2=1892873&pathrev=1892874&view=patch)

We then made a more future proof follow up: https://svn.apache.org/r1893101
(this one is stricter on parsing the UDS "unix:" scheme, and I had
feedbacks that it broke configs like:
  SetHandler "proxy:unix:///run/php8/website.sock|fcgi://website/"
where the expected syntax would be:
  SetHandler "proxy:unix:/run/php8/website.sock|fcgi://website/"
I don't know where the "proxy:unix:///" was taken from, just to let you know..).


Cheers;
Yann.
Comment 2 Petr Gajdos 2021-09-22 11:11:37 UTC
Will take
https://svn.apache.org/viewvc?view=revision&revision=1893101

11sp1/apache2: fix_uds_filename code not found
Comment 3 Petr Gajdos 2021-09-22 11:16:00 UTC
Will submit for: 15sp2,15,12sp2/apache2
Comment 4 Petr Gajdos 2021-09-22 12:07:09 UTC
Packages submitted.

I believe all fixed.
Comment 7 Swamp Workflow Management 2021-10-06 19:36:34 UTC
SUSE-SU-2021:3299-1: An update that fixes three vulnerabilities is now available.

Category: security (important)
Bug References: 1190666,1190669,1190703
CVE References: CVE-2021-34798,CVE-2021-39275,CVE-2021-40438
JIRA References: 
Sources used:
SUSE OpenStack Cloud Crowbar 9 (src):    apache2-2.4.23-29.80.1
SUSE OpenStack Cloud Crowbar 8 (src):    apache2-2.4.23-29.80.1
SUSE OpenStack Cloud 9 (src):    apache2-2.4.23-29.80.1
SUSE OpenStack Cloud 8 (src):    apache2-2.4.23-29.80.1
SUSE Linux Enterprise Software Development Kit 12-SP5 (src):    apache2-2.4.23-29.80.1
SUSE Linux Enterprise Server for SAP 12-SP4 (src):    apache2-2.4.23-29.80.1
SUSE Linux Enterprise Server for SAP 12-SP3 (src):    apache2-2.4.23-29.80.1
SUSE Linux Enterprise Server 12-SP5 (src):    apache2-2.4.23-29.80.1
SUSE Linux Enterprise Server 12-SP4-LTSS (src):    apache2-2.4.23-29.80.1
SUSE Linux Enterprise Server 12-SP3-LTSS (src):    apache2-2.4.23-29.80.1
SUSE Linux Enterprise Server 12-SP3-BCL (src):    apache2-2.4.23-29.80.1
SUSE Linux Enterprise Server 12-SP2-BCL (src):    apache2-2.4.23-29.80.1
HPE Helion Openstack 8 (src):    apache2-2.4.23-29.80.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 8 Swamp Workflow Management 2021-10-12 10:17:41 UTC
SUSE-SU-2021:3335-1: An update that fixes 5 vulnerabilities is now available.

Category: security (important)
Bug References: 1189387,1190666,1190669,1190702,1190703
CVE References: CVE-2021-33193,CVE-2021-34798,CVE-2021-36160,CVE-2021-39275,CVE-2021-40438
JIRA References: 
Sources used:
SUSE Linux Enterprise Server for SAP 15-SP1 (src):    apache2-2.4.33-3.55.1
SUSE Linux Enterprise Server for SAP 15 (src):    apache2-2.4.33-3.55.1
SUSE Linux Enterprise Server 15-SP1-LTSS (src):    apache2-2.4.33-3.55.1
SUSE Linux Enterprise Server 15-SP1-BCL (src):    apache2-2.4.33-3.55.1
SUSE Linux Enterprise Server 15-LTSS (src):    apache2-2.4.33-3.55.1
SUSE Linux Enterprise High Performance Computing 15-SP1-LTSS (src):    apache2-2.4.33-3.55.1
SUSE Linux Enterprise High Performance Computing 15-SP1-ESPOS (src):    apache2-2.4.33-3.55.1
SUSE Linux Enterprise High Performance Computing 15-LTSS (src):    apache2-2.4.33-3.55.1
SUSE Linux Enterprise High Performance Computing 15-ESPOS (src):    apache2-2.4.33-3.55.1
SUSE Enterprise Storage 6 (src):    apache2-2.4.33-3.55.1
SUSE CaaS Platform 4.0 (src):    apache2-2.4.33-3.55.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 10 Swamp Workflow Management 2021-10-26 19:17:52 UTC
SUSE-SU-2021:3522-1: An update that fixes four vulnerabilities is now available.

Category: security (important)
Bug References: 1190666,1190669,1190702,1190703
CVE References: CVE-2021-34798,CVE-2021-36160,CVE-2021-39275,CVE-2021-40438
JIRA References: 
Sources used:
SUSE Linux Enterprise Module for Server Applications 15-SP3 (src):    apache2-2.4.43-3.32.1
SUSE Linux Enterprise Module for Server Applications 15-SP2 (src):    apache2-2.4.43-3.32.1
SUSE Linux Enterprise Module for Packagehub Subpackages 15-SP3 (src):    apache2-2.4.43-3.32.1
SUSE Linux Enterprise Module for Basesystem 15-SP3 (src):    apache2-2.4.43-3.32.1
SUSE Linux Enterprise Module for Basesystem 15-SP2 (src):    apache2-2.4.43-3.32.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 11 Swamp Workflow Management 2021-10-26 19:20:49 UTC
openSUSE-SU-2021:3522-1: An update that fixes four vulnerabilities is now available.

Category: security (important)
Bug References: 1190666,1190669,1190702,1190703
CVE References: CVE-2021-34798,CVE-2021-36160,CVE-2021-39275,CVE-2021-40438
JIRA References: 
Sources used:
openSUSE Leap 15.3 (src):    apache2-2.4.43-3.32.1
Comment 12 Swamp Workflow Management 2021-11-02 17:29:31 UTC
openSUSE-SU-2021:1438-1: An update that fixes four vulnerabilities is now available.

Category: security (important)
Bug References: 1190666,1190669,1190702,1190703
CVE References: CVE-2021-34798,CVE-2021-36160,CVE-2021-39275,CVE-2021-40438
JIRA References: 
Sources used:
openSUSE Leap 15.2 (src):    apache2-2.4.43-lp152.2.21.1