Bug 1199225 - (CVE-2022-30115) VUL-0: CVE-2022-30115: curl: HSTS bypass via trailing dot (6/6)
VUL-0: CVE-2022-30115: curl: HSTS bypass via trailing dot (6/6)
Classification: Novell Products
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents
Other Other
: P3 - Medium : Normal
: ---
Assigned To: Security Team bot
Security Team bot
Depends on:
  Show dependency treegraph
Reported: 2022-05-05 07:05 UTC by Robert Frohl
Modified: 2022-09-16 12:52 UTC (History)
3 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Comment 4 Gianluca Gabrielli 2022-05-11 07:03:34 UTC

HSTS bypass via trailing dot

Project curl Security Advisory, May 11 2022 -


curl's HSTS check could be bypassed to trick it to keep using HTTP.

Using its HSTS support, curl can be instructed to use HTTPS directly instead
of using an insecure clear-text HTTP step even when HTTP is provided in the
URL. This mechanism could be bypassed if the host name in the given URL used a
trailing dot while not using one when it built the HSTS cache. Or the other
way around - by having the trailing dot in the HSTS cache and *not* using the
trailing dot in the URL.

Since trailing dots in host names are somewhat special, many sites work
equally fine with or without a trailing dot present.

We are not aware of any exploit of this flaw.


This flaw was introduced in [commit
b27ad8e1d3e68e](https://github.com/curl/curl/commit/b27ad8e1d3e68e), shipped
in curl 7.82.0 when the treatment of trailing dot host names was changed.

Similar issues have been raised in the past for
[Firefox](https://www.mozilla.org/en-US/security/advisories/mfsa2015-13/) and
for [Chrome](https://bugs.chromium.org/p/chromium/issues/detail?id=461481).

The Common Vulnerabilities and Exposures (CVE) project has assigned the name
CVE-2022-30115 to this issue.

CWE-319: Cleartext Transmission of Sensitive Information

Severity: Medium


- Affected versions: curl 7.82.0 to and including 7.83.0
- Not affected versions: curl < 7.82.0 and curl >= 7.83.1

libcurl is used by many applications, but not always advertised as such!


A [fix for CVE-2022-30115](https://github.com/curl/curl/commit/fae6fea209a2d4d)


 A - Upgrade curl to version 7.83.1

 B - Apply the patch to your local version

 C - Stick to always using `HTTPS://` in URLs


This issue was reported to the curl project on May 3, 2022. We contacted
distros@openwall on May 5.

libcurl 7.83.1 was released on May 11 2022, coordinated with the publication
of this advisory.


This issue was reported by Axel Chong. Patched by Daniel Stenberg.

Thanks a lot!


 / daniel.haxx.se
 | Commercial curl support up to 24x7 is available!
 | Private help, bug fixes, support, ports, new features
 | https://curl.se/support.html
Comment 6 David Anes 2022-05-13 07:04:41 UTC
Everything was done. Sent it back to security team.
Comment 7 Carlos López 2022-09-16 12:52:55 UTC
Done, closing.