---
title: "Signup prints each new user's bcrypt password hash…"
description: "GHSA-mr5j-gm4f-6c27: Signup prints each new user's bcrypt password hash to the server's standard output. Affected and fixed versions of qwed."
url: https://qwedai.tech/security/advisories/ghsa-mr5j-gm4f-6c27
---

[Security](https://qwedai.tech/security) · [Advisories](https://qwedai.tech/security/advisories) · GHSA-mr5j-gm4f-6c27

# Signup prints each new user's bcrypt password hash to the server's standard output

low Fixed in 9.0.0 GHSA-mr5j-gm4f-6c27 · Published 6 November 2026

## Impact

`POST /auth/signup` prints each new user's bcrypt password hash to the server's standard output. Anyone who can read the server's logs (a log aggregator, `docker logs`, a hosting provider's log view, a support bundle) gets the hash and can attack it offline, without the rate limit that guards `/auth/signin`.

`signup` in `src/qwed_new/auth/routes.py` has these debug prints around the user insert:

```python
print(f"DEBUG: Creating user with email={request.email}, org_id={org.id}")
...
print(f"DEBUG: User object created: {user}")
...
print("DEBUG: User committed successfully")
...
print(f"DEBUG: Error creating user: {e}")
traceback.print_exc()
```

`User` is a SQLModel table model, and its `str()` lists every field, including `password_hash`. One signup on 8.0.0 printed:

```
DEBUG: Creating user with email=leak-check@example.com, org_id=1
DEBUG: User object created: email='leak-check@example.com' password_hash='$2b$12$9kHA...' organization_id=1 role='owner' ...
DEBUG: User committed successfully
```

The first line also writes the user's email to the log on every signup. The error branch prints the exception and its traceback.

The prints write to standard output, so they do not go through the logging configuration and cannot be turned off by log level.

## Severity

Low. Reading the hash needs access to the server's logs, and bcrypt (cost 12) slows offline guessing. A weak password can still be recovered from its hash, and logs are often kept longer and shared more widely than the database.

## Affected

`qwed` (PyPI) up to and including 8.0.0, and the server image built from it. The prints are in every tagged release checked (v1.1.0 to v8.0.0).

## Patches

Fixed in 9.0.0 ([`9d23246`](https://github.com/QWED-AI/qwed-verification/commit/9d23246e51c1867e77686806b114efefa0a872af) ). Upgrade to 9.0.0 or later.

The debug prints and `traceback.print_exc()` are removed from `signup`. A failed user insert logs only the exception type through the module's logger (`User creation failed during signup: <ExceptionType>`), not its message, which can carry the row's parameters. The response is unchanged.

## Workarounds

Upgrade to 9.0.0. Upgrading stops new hashes reaching the logs but does not remove those already written: remove signup lines containing `password_hash=` from logs already collected, and restrict who can read them. Hashes that may have been read should be treated as exposed: ask those users to change their passwords. On older versions, also restrict who can read the server's standard output.

[All advisories](https://qwedai.tech/security/advisories)

Affected and fixed

qwed

Affected <= 8.0.0 Fixed in 9.0.0

Weakness

CWE-532 Insertion of Sensitive Information into Log File

[View on GitHub](https://github.com/QWED-AI/qwed-verification/security/advisories/GHSA-mr5j-gm4f-6c27)
