Description
Spug before 4.1.1 contains an information disclosure vulnerability that allows authenticated non-administrator users to read per-host SSH private keys through the GET /api/host/ endpoint. Users granted a host can read the cleartext pkey field returned by Host.to_view and log in directly over SSH, bypassing Spug's permissions and audit trail even after revocation.
Affected products and versions
openspug spug< 4.1.1Fixed in: 4.1.1
CVSS vector, explained
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
- Attack vector
- Network (from the internet)
- Attack complexity
- Low
- Privileges required
- Regular user
- User interaction
- Not required
- Scope
- Vulnerable component only
- Confidentiality
- High impact
- Integrity
- None
- Availability
- None
Weakness type (CWE)
- CWE-201 Insertion of Sensitive Information Into Sent Data
References
- github.com/openspug/spug/security/advisories/GHSA-cpvp-p8jv-vhxg vendor advisory
- github.com/openspug/spug/commit/7878d9d73fd5deaa62f35bea88b8a93a4833d4e9 patch
- github.com/openspug/spug/releases/tag/v4.1.1
- github.com/openspug/spug/blob/v4.1.0/spug_api/apps/host/views.py#L26-L34
- github.com/openspug/spug/blob/v4.1.0/spug_api/apps/host/models.py#L31-L36
- www.vulncheck.com/advisories/spug-before-4.1.1-ssh-private-key-disclosure-via-host-api
Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Always check the vendor's official advisory.