# CVE-2025-27413: PwnDoc Arbitrary File Write to RCE using Path Traversal in template update from backup templates.json

- Severity: Medium 6.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N`
- 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): 1.18%, higher than 68% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-02-28T21:02:35.656Z
- Modified: 2026-06-17T09:03:32.430Z
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

PwnDoc is a penetration test reporting application. Prior to version 1.2.0, the backup restore functionality allows an administrator to import raw data into the database, including Path Traversal (`../`) sequences. This is problematic for the template update functionality as it uses the path from the database to write arbitrary content to, potentially overwriting source code to achieve Remote Code Execution. Any user with the `backups:create`, `backups:update` and `templates:update` permissions (only administrators by default) can write arbitrary content to anywhere on the filesystem. By overwriting source code, it is possible to achieve Remote Code Execution. Version 1.2.0 fixes the issue.

(As written by CVE List.)

## Affected

- pwndoc pwndoc: < 1.2.0
- pwndoc_project pwndoc: before 1.2.0

## Every score

- GitHub_M: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N`
- NVD: CVSS:3.1 4.9 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N`

## References

- <https://github.com/pwndoc/pwndoc/security/advisories/GHSA-r3vj-47cf-4672> (exploit, vendor-advisory)
- <https://github.com/pwndoc/pwndoc/commit/68aa1ea676a91e17bfb333a27571151bd07fb21d> (patch)
- <https://github.com/pwndoc/pwndoc/blob/14acb704891245bf1703ce6296d62112e85aa995/backend/src/models/template.js#L170-L175> (product)
- <https://github.com/pwndoc/pwndoc/blob/14acb704891245bf1703ce6296d62112e85aa995/backend/src/routes/backup.js#L826-L827> (product)
- <https://github.com/pwndoc/pwndoc/blob/14acb704891245bf1703ce6296d62112e85aa995/backend/src/routes/template.js#L63-L66> (product)
- <https://github.com/pwndoc/pwndoc/releases/tag/v1.2.0> (release-notes)

## Sources

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

---

Page: https://cve.day/CVE-2025-27413 · Whole record: https://cve.day/CVE-2025-27413.json · Rebuilt by cve.day 2026-11-25T22:58:54.823Z
