# GHSA-qh54-9vc5-m9fg: MD5 hash support in github.com/foxcpp/maddy

> Maddy mail server allows weak MD5 hashes in shadow files, enabling potential authentication bypass on outdated systems.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 12 Oct 2021
- **Also known as:** GO-2022-0378

## What is GHSA-qh54-9vc5-m9fg?

GHSA-qh54-9vc5-m9fg is a vulnerability in github.com/foxcpp/maddy, published on 12 Oct 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Impact

This vulnerability affects maddy 0.5.1, 0.5.0 users using auth.shadow module
and an extremely outdated system that still allows MD5 hashes in 
/etc/shadows.

### Patches

Patch is available as part of the 0.5.2 release.

### Workarounds

Ensure MD5 hashes are not present in /etc/shadow.

## Which versions are affected by GHSA-qh54-9vc5-m9fg?

3 open source packages ship an affected version, including github.com/foxcpp/maddy.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/foxcpp/maddy` | Go | From 0.5.0 | 0.5.2 |
| `github.com/foxcpp/maddy` | Go | From 0.5.0 | 0.5.2 |
| `github.com/foxcpp/maddy` | Go | From 0.5.0 | 0.5.2 |

## How do I fix GHSA-qh54-9vc5-m9fg?

Upgrade github.com/foxcpp/maddy to 0.5.2 or later.

## Is GHSA-qh54-9vc5-m9fg being exploited?

There is no known exploitation of GHSA-qh54-9vc5-m9fg in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-qh54-9vc5-m9fg and fix it if it is affected.

What it is: GHSA-qh54-9vc5-m9fg is a vulnerability in github.com/foxcpp/maddy, published on 12 Oct 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-qh54-9vc5-m9fg in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/foxcpp/maddy (Go): affected from 0.5.0; fixed in 0.5.2
- github.com/foxcpp/maddy (Go): affected from 0.5.0; fixed in 0.5.2
- github.com/foxcpp/maddy (Go): affected from 0.5.0; fixed in 0.5.2

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/GHSA-qh54-9vc5-m9fg/ (Markdown: https://insights.sbomify.com/GHSA-qh54-9vc5-m9fg/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-qh54-9vc5-m9fg

---
From sbomify Insights: https://insights.sbomify.com/GHSA-qh54-9vc5-m9fg/
Summaries are generated and may contain mistakes; the official description above is the record.
