Bug 2105085 (CVE-2022-31081) - CVE-2022-31081 perl-HTTP-Daemon: HTTP::Daemon allows request smuggling
Summary: CVE-2022-31081 perl-HTTP-Daemon: HTTP::Daemon allows request smuggling
Keywords:
Status: NEW
Alias: CVE-2022-31081
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On: 2119270 2119271 2119272 2119273 2119274 2173127
Blocks: 2105086
TreeView+ depends on / blocked
 
Reported: 2022-07-07 20:52 UTC by Sage McTaggart
Modified: 2023-09-22 09:23 UTC (History)
6 users (show)

Fixed In Version: HTTP-Daemon 6.15
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github libwww-perl HTTP-Daemon issues 56 0 None open Discrepancies in the Parsing of Content Length header leading to http request smuggling 2022-07-13 08:38:57 UTC

Description Sage McTaggart 2022-07-07 20:52:22 UTC

HTTP::Daemon is a simple http server class written in perl. Versions prior to 6.15 are subject to a vulnerability which could potentially be exploited to gain privileged access to APIs or poison intermediate caches. It is uncertain how large the risks are, most Perl based applications are served on top of Nginx or Apache, not on the `HTTP::Daemon`. This library is commonly used for local development and tests. Users are advised to update to resolve this issue. Users unable to upgrade may add additional request handling logic as a mitigation. After calling `my $rqst = $conn->get_request()` one could inspect the returned `HTTP::Request` object. Querying the 'Content-Length' (`my $cl = $rqst->header('Content-Length')`) will show any abnormalities that should be dealt with by a `400` response. Expected strings of 'Content-Length' SHOULD consist of either a single non-negative integer, or, a comma separated repetition of that number. (that is `42` or `42, 42, 42`). Anything else MUST be rejected.

Comment 1 Petr Pisar 2022-07-08 07:56:33 UTC
The description is about a completely different bug in an unrelated software.

The HTTP-Deamon bug is reported to upstream at <https://github.com/libwww-perl/HTTP-Daemon/issues/56>.

Comment 2 Petr Pisar 2022-07-08 08:00:48 UTC
I think CVE-2022-31081 <https://nvd.nist.gov/vuln/detail/CVE-2022-31081> is for HTTP-Deamon. CVE-2022-31082 <https://nvd.nist.gov/vuln/detail/CVE-2022-31082> is for the unrelated GLPI.

Comment 3 Michal Josef Spacek 2022-07-08 09:50:48 UTC
@amctagga Could you please rename this ticket to mention CVE-2022-31081 only? For issue with perl-HTTP-Daemon.

Comment 6 Sage McTaggart 2022-07-12 19:55:07 UTC
In reply to comment #3:
> @amctagga Could you please rename this ticket to mention
> CVE-2022-31081 only? For issue with perl-HTTP-Daemon.
Made the edit, both were in the same initial report so this was filed together. Hope that helps!

Comment 7 Petr Pisar 2022-07-13 08:38:58 UTC
Upstream commits supposedly fixing this vulnerability:

e84475de51d6fd7b29354a997413472a99db70b2 Fix Content-Length ', '-separated string issues
8dc5269d59e2d5d9eb1647d82c449ccd880f7fd0 Include reason in response body content
faebad54455c2c2919e234202362570925fb99d1 Add new test for Content-Length issues
ef8c1265c9558e92bac3178a0ed42eb937d943c6 Remove 'trailing spaces' to satisfy some authors
c10445d014584546f99f85d240000b4a140ec37a (HEAD -> master, origin/master, origin/HEAD) Add CVE-2022-31081 fix to the Revision History

Comment 9 Sandipan Roy 2022-08-18 07:07:23 UTC
Created perl-HTTP-Daemon tracking bugs for this issue:

Affects: fedora-all [bug 2119270]

Comment 11 Michal Josef Spacek 2022-08-19 10:52:16 UTC
Upstream has not released a new version of distribution with fixes, because there are some failing tests related to the issue.

Comment 12 Michal Josef Spacek 2023-04-19 13:43:01 UTC
Fix was delivered by upstream version of HTTP::Daemon 6.15


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