Bug 1973609 (CVE-2021-29157) - CVE-2021-29157 dovecot: local attacker can login as any user and access their emails
Summary: CVE-2021-29157 dovecot: local attacker can login as any user and access their...
Keywords:
Status: CLOSED NOTABUG
Alias: CVE-2021-29157
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1974392 1979833 1980006 1980007 1980008
Blocks: 1973612
TreeView+ depends on / blocked
 
Reported: 2021-06-18 10:21 UTC by Marian Rehak
Modified: 2022-04-20 20:08 UTC (History)
5 users (show)

Fixed In Version: dovecot 2.3.14.1
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in dovecot where it did not properly parse the `kid` and `azp` fields in JWT tokens. This flaw allows a local attacker to bypass dovecot's authentication, and access a user's emails. The highest threat from this vulnerability is to confidentiality and integrity.
Clone Of:
Environment:
Last Closed: 2021-11-15 13:18:46 UTC
Embargoed:


Attachments (Terms of Use)

Description Marian Rehak 2021-06-18 10:21:18 UTC
Dovecot does not correctly escape kid and azp fields in JWT tokens. This may be used to supply attacker controlled keys to validate tokens in some configurations. This requires attacker to be able to write files to local disk.

Workaround: Disable local JWT validation in oauth2, or use a different dict driver than fs:posix.

Reference: https://dovecot.org/pipermail/dovecot-news/2021-June/000461.html

Comment 1 Guilherme de Almeida Suckevicz 2021-06-21 14:48:55 UTC
Created dovecot tracking bugs for this issue:

Affects: fedora-all [bug 1974392]


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