OctorpkiApplication · Cloudflare

CVE-2021-3978

MEDIUM · 5.5 CVSS v3.1 Published 2025-01-29
Fix available
A fix is available. Upgrade to 1.4.2 or later.
See remediation →
57/100
Remediation priority · Elevated
Zero-click

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 · unedited
When copying files with rsync, octorpki uses the "-a" flag 0, which forces rsync to copy binaries with the suid bit set as root. Since the provided service definition defaults to root ( https://github.com/cloudflare/cfrpki/blob/master/package/octorpki.service ) this could allow for a vector, when combined with another vulnerability that causes octorpki to process a malicious TAL file, for a local privilege escalation.

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 confidence

octorpki uses rsync with the '-a' (archive) flag when copying files, which preserves special file attributes including the suid bit. Since the octorpki service runs as root by default, this becomes a privilege escalation vector when combined with another vulnerability that allows processing of malicious TAL (Trust Anchor Locator) files - an attacker could potentially craft a binary with suid bits that gets copied and executed with elevated privileges.

MitigationModify the rsync command to exclude preservation of suid bits (e.g., use specific flags like --no-perms --no-owner --no-group instead of '-a', or explicitly use --no-suid), or run the octorpki service as a non-root user with appropriate file permissions.

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
OctorpkiApplication
Affected:< 1.4.2

CVSS 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
Local
Complexity
Low
Privileges
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N

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 checks

Work through these to decide whether this CVE applies to you.

  1. Verify octorpki is installed
    Check if the octorpki package or service exists on the system (e.g., which octorpki, systemctl list-units | grep octorpki, or checking package manager listings)
    Affected if octorpki is not found on the system, the system is not affected by this CVE
  2. Check installed octorpki version
    Query the installed version using the package manager or octorpki binary version flag (e.g., rpm -q octorpki, dpkg -l octorpki, or octorpki --version)
    Affected if the installed version is lower than 1.4.2 (e.g., 1.4.1, 1.4.0, or any version < 1.4.2)
  3. Confirm octorpki service runs as root
    Inspect the service configuration or running process to determine the user context (e.g., ps aux | grep octorpki or check the service unit file for User= directive)
    Affected if the octorpki service runs as root or with elevated privileges (User=root)
  4. Verify rsync is used with -a flag in octorpki operations
    Examine octorpki source code, configuration files, or process execution for rsync commands that include the '-a' archive flag
    Affected if rsync is invoked with the '-a' flag in octorpki file copy operations

A system is affected if octorpki version < 1.4.2 is installed, the service runs as root, and rsync with the -a flag is used for file operations that could copy TAL files with suid bits preserved.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

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 · scoped
Upgrade available Upgrade to 1.4.2 or later
Fixed in 1.4.2
Interim mitigation

Modify the rsync command to exclude preservation of suid bits (e.g., use specific flags like --no-perms --no-owner --no-group instead of '-a', or explicitly use --no-suid), or run the octorpki service as a non-root user with appropriate file permissions.

Recommended fix Moderate confidence

1.4.2

  1. 1. Backup the current octorpki installation and configuration
  2. 2. Check the current installed version of octorpki
  3. 3. Obtain octorpki version 1.4.2 or later from the official repository (github.com/cloudflare/cfrpki)
  4. 4. Stop the octorpki service if running
  5. 5. Install the updated version of octorpki
  6. 6. Verify the rsync command in the code no longer uses the '-a' flag with suid preservation, or uses '-p' (preserve permissions) without '-a' (which includes -o for owner)
  7. 7. Restart the octorpki service
  8. 8. Verify the service runs correctly with the updated version

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Octorpki Scoped from the published advisory
  • Consultation1.0 h
  • Implementation2.0 h
  • Testing3.0 h
  • Review / QA2.0 h
8.0 hours of engineering $1,370
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $2,192.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2021-3978 — 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 sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2021-3978 in production — separate from our analysis above.

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.

What this is

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.

What belongs here
  • 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