This seems to be a bug in RHEL-8 curl. We should be able to fix it by backporting the following upstream commit:
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (Moderate: curl security and bug fix update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.