# CVE-2019-16791: downgrade of effective Strict Transport Security (STS) policy in postfix-mta-sts-resolver

> An attacker can downgrade the effective Strict Transport Security policy in postfix-mta-sts-resolver, bypassing TLS enforcement protections.

- **Severity:** Medium 6.9 (`CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 22 Jan 2020
- **Updated:** 5 Aug 2024
- **Also known as:** GHSA-h92m-42h4-82f6, PYSEC-2020-174, UBUNTU-CVE-2019-16791

## What is CVE-2019-16791?

CVE-2019-16791 is a medium-severity vulnerability in Snawoot postfix-mta-sts-resolver, published on 22 Jan 2020. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

In postfix-mta-sts-resolver before 0.5.1, All users can receive incorrect response from daemon under rare conditions, rendering downgrade of effective STS policy.

Weakness: CWE-757 (Selection of Less-Secure Algorithm During Negotiation)

## Which versions are affected by CVE-2019-16791?

3 open source packages ship an affected version, including postfix-mta-sts-resolver. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `postfix-mta-sts-resolver` | PyPI | All versions | 0.5.1 |
| `postfix-mta-sts-resolver` | PyPI | All versions | 0.5.1 |
| `postfix-mta-sts-resolver` | PyPI | All versions | 0.5.1 |

Products: Postfix-Mta-Sts-Resolver Project Postfix-Mta-Sts-Resolver.

## How do I fix CVE-2019-16791?

Upgrade postfix-mta-sts-resolver to 0.5.1 or later.

## Is CVE-2019-16791 being exploited?

There is no known exploitation of CVE-2019-16791 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2019-16791 and fix it if it is affected.

What it is: CVE-2019-16791 is a medium-severity vulnerability in Snawoot postfix-mta-sts-resolver, published on 22 Jan 2020. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2019-16791 in the wild and no public exploit code.

Affected packages and fixed versions:
- postfix-mta-sts-resolver (PyPI): affected all versions; fixed in 0.5.1
- postfix-mta-sts-resolver (PyPI): affected all versions; fixed in 0.5.1
- postfix-mta-sts-resolver (PyPI): affected all versions; fixed in 0.5.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2019-16791/ (Markdown: https://insights.sbomify.com/CVE-2019-16791/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2019-16791
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2019-16791
- OSV: https://osv.dev/vulnerability/CVE-2019-16791

---
From sbomify Insights: https://insights.sbomify.com/CVE-2019-16791/
Summaries are generated and may contain mistakes; the official description above is the record.
