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

- Severity: High 8.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.65%, higher than 86% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-07-19T19:45:41.000Z
- Modified: 2026-06-17T03:52:02.867Z
- Assigned by: mitre

## 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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- pwndoc_project pwndoc: before 0.4.0

## Every score

- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 9.0 High `AV:N/AC:L/Au:S/C:C/I:C/A:C`

## References

- <https://www.dgc.org/responsible_disclosure_pwndoc_jwt> (exploit, third-party-advisory)
- <https://github.com/pwndoc/pwndoc/security/advisories> (broken-link)
- <https://github.com/pwndoc/pwndoc/pull/128> (patch, third-party-advisory)
- <https://github.com/pwndoc/pwndoc/pull/74> (patch, third-party-advisory)
- <https://github.com/pwndoc/pwndoc/blob/59519735b0d831d8fd96d7c3387f66d28407e583/CHANGELOG.md#040-2021-08-23> (patch, release-notes, third-party-advisory)
- <https://github.com/pwndoc/pwndoc/commit/15f3dc0e212eda465e05fda0feb002d1bce2939d> (patch, third-party-advisory)
- <https://github.com/pwndoc/pwndoc/commit/ff1b868cec55f5b6c7a91e15a2b0b1f4324121ab> (patch, third-party-advisory)

## Sources

- CVE List: [CVE-2021-31590](https://www.cve.org/CVERecord?id=CVE-2021-31590), CVE Terms of Use, modified 2024-08-03
- NVD: [CVE-2021-31590](https://nvd.nist.gov/vuln/detail/CVE-2021-31590), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-31590 · Whole record: https://cve.day/CVE-2021-31590.json · Rebuilt by cve.day 2026-11-25T22:58:02.733Z
