GHSA-w7jw-q4fg-qc4c is a high-severity (CVSS 7.1) Incorrect Default Permissions vulnerability in github.com/goreleaser/nfpm/v2. 1 public exploit reference exists, so weaponization risk is real. A fix is available for github.com/goreleaser/nfpm/v2 — see the affected versions and patch details below.
nfpm has incorrect default permissions
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA’s SSVC triage for GHSA-w7jw-q4fg-qc4c.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
GHSA-w7jw-q4fg-qc4c plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 377,636 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
github.com/goreleaser/nfpm/v2🐹github.com/goreleaser/nfpmReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Summary
When building packages directly from source control, file permissions on the checked-in files are not maintained.
Details
When building packages directly from source control, file permissions on the checked-in files are not maintained. When nfpm packaged the files (without extra config for enforcing its own permissions) files could go out with bad permissions (chmod 666 or 777).
PoC
Create a default nfpm structure.
Within the test folder, create 3 files named chmod-XXX.sh. Each script has file
permissions set corresponding with their file names (chmod-777.sh = chmod 777). Below each
file and permissions can be seen.
$ ls -lart test
total 24
-rwxrwxrwx 1 user group 11 May 19 13:15 chmod-777.sh
-rw-rw-rw- 1 user group 11 May 19 13:16 chmod-666.sh
drwxr-xr-x 5 user group 160 May 19 13:19 .
-rw-rw-r-- 1 user group 11 May 19 13:19 chmod-664.sh
drwxr-xr-x 10 user group 320 May 19 13:29 ..
Below is the snippet nfpm configuration file of the contents of the package. The test folder and files has no extra config for enforcing permissions.
contents:
- src: foo-binary
dst: /usr/bin/bar
- src: bar-config.conf
dst: /etc/foo-binary/bar-config.conf
type: config
- src: test
dst: /etc/test/scripts
The next step is to create a deb package.
$ nfpm package -p deb # Create dep package
using deb packager...
created package: foo_1.0.0_arm64.deb
When on a Ubuntu VM, install the foo package which was created
$ sudo dpkg -i foo_1.0.0_arm64.deb # Installing deb package within Ubuntu
Selecting previously unselected package foo.
(Reading database ... 67540 files and directories currently installed.)
Preparing to unpack foo_1.0.0_arm64.deb ...
Unpacking foo (1.0.0) ...
Setting up foo (1.0.0) ...
Looking at /etc/test/scripts and viewing the permissions. Permissions are passed exactly the same as the source.
$ ls -lart /etc/test/scripts
total 20
-rwxrwxrwx 1 root root 11 May 22 12:15 chmod-777.sh
-rw-rw-rw- 1 root root 11 May 22 12:16 chmod-666.sh
-rw-rw-r-- 1 root root 11 May 22 12:19 chmod-664.sh
drwxr-xr-x 3 root root 4096 May 22 13:00 ..
drwxr-xr-x 2 root root 4096 May 22 13:00 .
Solution
To prevent world-writable files from making it into the packages, add the ability to override the default permissions of packaged files using a umask config option in the packaging spec file. This feature in nfpm would allow applying a global umask across any files being packaged, therefore, with the correct configuration, preventing world-writable files without needing to list permissions on each and every file in the package
Impact
Vulnerability is https://cwe.mitre.org/data/definitions/276.html https://www.first.org/cvss/calculator/3.0#CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
Anyone using nfpm for creating packages and not checking/setting file permissions before packaging could result in bad permissions for files/folders.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/goreleaser/nfpm/v2 | ≥ 2.0.0&&< 2.29.0 | 2.29.0go get github.com/goreleaser/nfpm/v2@v2.29.0 |
| 🐹Go | github.com/goreleaser/nfpm | ≥ 0.1.0 | No fix |
Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/goreleaser/nfpm/v2, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/goreleaser/nfpm/v2 to 2.29.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-w7jw-q4fg-qc4c is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-w7jw-q4fg-qc4c can be triaged on real exposure rather than presence alone.
Tailored to GHSA-w7jw-q4fg-qc4c. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-w7jw-q4fg-qc4c in your dependencies?
O3 Security finds GHSA-w7jw-q4fg-qc4c across Go dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.