CVE-2021-3148
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedAn issue was discovered in SaltStack Salt before 3002.5. Sending crafted web requests to the Salt API can result in salt.utils.thin.gen_thin() command injection because of different handling of single versus double quotes. This is related to salt/utils/thin.py.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceA command injection vulnerability exists in SaltStack Salt's API before version 3002.5. The issue is in the salt.utils.thin.gen_thin() function within salt/utils/thin.py, where improper handling of quote characters (single vs double quotes) in crafted web requests allows attackers to inject arbitrary commands. This is a critical remote code execution vulnerability accessible via the Salt API.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data= 32= 33= 34= 9.0= 10.0= 11.0< 2015.8.10>= 2015.8.11, < 2015.8.13>= 2016.3.0, < 2016.3.4>= 2016.3.5, < 2016.3.6>= 2016.3.7, < 2016.3.8>= 2016.3.9, < 2016.11.3>= 2016.11.4, < 2016.11.5>= 2016.11.7, < 2016.11.10>= 2017.5.0, < 2017.7.8>= 2018.2.0, <= 2018.3.5>= 2019.2.0, < 2019.2.5>= 2019.2.6, < 2019.2.8CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify installed Salt versionRun 'salt --version' or 'salt-master --version' to determine the installed version of SaltStack SaltAffected if The version is less than 2015.8.10; OR between 2015.8.11 and 2015.8.12; OR between 2016.3.0 and 2016.3.3; OR between 2016.3.5 and 2016.3.5; OR between 2016.3.7 and 2016.3.7; OR between 2016.3.9 and 2016.11.2; OR between 2016.11.4 and 2016.11.4; OR between 2016.11.7 and 2016.11.9; OR between 2017.5.0
-
Verify Salt API is exposedCheck if the Salt API service (salt-api) is running and listening on network ports. Look for processes containing 'salt-api' or check for listening ports 8000-8008 commonly used by Salt APIAffected if The Salt API is running and accessible on a network interface
-
Confirm vulnerable module existsInspect the file salt/utils/thin.py in the Salt installation directory and verify the gen_thin() function is presentAffected if The salt/utils/thin.py file exists with the gen_thin() function available to be called via the API
-
Check API authentication settingsReview Salt API configuration files (typically /etc/salt/master or /etc/salt/api) for authentication settings, specifically whether external authentication is required for API endpointsAffected if Weak or no authentication is configured for the Salt API endpoints
A system is affected if it runs a vulnerable Salt version (as listed above) with the Salt API exposed and accessible, allowing remote attackers to inject commands through the gen_thin() function via crafted web requests.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped2015.8.102015.8.132016.3.4
Upgrade SaltStack Salt to version 3002.5 or later to remediate this vulnerability. Until upgraded, restrict network access to the Salt API to trusted IPs only and ensure strong authentication is enforced.
Upgrade to SaltStack Salt version 3002.5 or later (e.g., 3002.5, 3003.x, or latest stable 3006.x)
- 1. Back up your Salt master configuration and state files before proceeding.
- 2. For systems running Salt packages: Upgrade Salt to version 3002.5 or later using your system's package manager (e.g., yum, dnf, apt).
- 3. For pip-based installations: Run 'pip install --upgrade salt>=3002.5' to get the patched version.
- 4. After upgrading, restart the Salt master service: 'systemctl restart salt-master' (or equivalent for your init system).
- 5. Verify the upgrade by checking the Salt version: 'salt --version' and confirm it shows 3002.5 or higher.
- 6. Test that the Salt API responds correctly and basic Salt commands function normally.
- 7. Review Salt API access controls and ensure the API is not exposed to untrusted networks, as a defense-in-depth measure.
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation2.0 h
- Implementation4.0 h
- Testing4.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,328.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2021-3148 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2021-3148 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data