Skip to content
Crypto Disclosed report Advanced CVE-2022-32208

CVE-2022-32208: FTP-KRB bad message verification

curl mishandled message verification failures during FTP transfers secured by Kerberos, so a man-in-the-middle attack could go unnoticed and inject data into the client. The flaw typically causes curl to insert a fixed error code into the data stream before the attacker's data.

nyymi Follow

Originally disclosed on HackerOne

Bounty$480 Low View original
  • Fixed in 12 hours
  • Paid in 12 hours
  • Disclosed after 13 hours

Summary by the program

CVE-2022-32208: FTP-KRB bad message verification Project curl Security Advisory, June 27th 2022

VULNERABILITY When curl does FTP transfers secured by krb5, it handles message verification failures wrongly. This flaw makes it possible for a Man-In-The-Middle attack to go unnoticed and even allows it to inject data to the client.

We are not aware of any exploit of this flaw.

INFO CVE-2022-32208 was introduced in commit 54967d2a3a, shipped in curl 7.16.4.

This flaw typically makes curl insert 599 (+ terminating null) into the data where it detects the error, then the attackers data. It forces the attacker to be somewhat creative to handle this initial hard-coded 5 byte sequence of "junk".

FTP-KRB is a rarely used feature.

CWE-924: Improper Enforcement of Message Integrity During Transmission in a Communication Channel

Severity: Low

AFFECTED VERSIONS Affected versions: curl 7.16.4 to and including 7.83.1 Not affected versions: curl < 7.16.4 and curl >= 7.84.0 libcurl is used by many applications, but not always advertised as such!

THE SOLUTION A fix for CVE-2022-32208

RECOMMENDATIONS A - Upgrade curl to version 7.84.0

B - Apply the patch to your local version

C - Do not use KRB-FTP

TIMELINE This issue was reported to the curl project on June 2, 2022. We contacted distros@openwall on June 20.

libcurl 7.84.0 was released on June 27 2022, coordinated with the publication of this advisory.

CREDITS This issue was reported by Harry Sintonen. Patched by Daniel Stenberg.

Thanks a lot!

Security Advisory: https://curl.se/docs/CVE-2022-32208.html

The report

When curl does FTP transfers secured by krb5, it handles message verification failures wrongly. This flaw makes it possible for a Man-In-The-Middle attack to go unnoticed and even allows it to inject data to the client.

Impact

Loss of integrity of FTP-KRB transfers

The original report as published on HackerOne, by nyymi. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely, curl did not correctly enforce message integrity checks on FTP-KRB transfers, so verification failures were not treated as fatal and attacker-supplied data could follow a hard-coded error marker.

Impact

A man-in-the-middle could go unnoticed and inject data into the client, causing loss of integrity of FTP-KRB transfers; the advisory notes no known exploit and that FTP-KRB is rarely used.

What the attacker needed

FTP-KRB feature in use; attacker in man-in-the-middle position

The fix

The issue was fixed in curl 7.84.0, and the advisory also recommends applying the patch or not using KRB-FTP.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When curl downloads files over FTP with Kerberos security, it is supposed to check that the data has not been tampered with. This bug meant that when that check failed, curl did not stop properly and could let an attacker in the middle slip extra data into the download. Kerberos is a system for proving identity on a network.

What is Crypto?

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.

More by nyymi

View all

51 more disclosed reports, best first.

More from Internet Bug Bounty

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cryptographic weaknesses

The lesson behind this report.

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.