CVE-2021-3882Sensitive Cookie in HTTPS Session Without 'Secure' Attribute in ledgersmb/ledgersmb
LedgerSMB does not set the 'Secure' attribute on the session authorization cookie when the client uses HTTPS and the LedgerSMB server is behind a reverse proxy. By tricking a user to use an unencrypted connection (HTTP), an attacker may be able to obtain the authentication data by capturing network traffic. LedgerSMB 1.8 and newer switched from Basic authentication to using cookie authentication with encrypted cookies. Although an attacker can't access the information inside the cookie, nor the password of the user, possession of the cookie is enough to access the application as the user from which the cookie has been obtained. In order for the attacker to obtain the cookie, first of all the server must be configured to respond to unencrypted requests, the attacker must be suitably positioned to eavesdrop on the network traffic between the client and the server *and* the user must be tricked into using unencrypted HTTP traffic. Proper audit control and separation of duties limit Integrity impact of the attack vector. Users of LedgerSMB 1.8 are urged to upgrade to known-fixed versions. Users of LedgerSMB 1.7 or 1.9 are unaffected by this vulnerability and don't need to take action. As a workaround, users may configure their Apache or Nginx reverse proxy to add the Secure attribute at the network boundary instead of relying on LedgerSMB. For Apache, please refer to the 'Header always edit' configuration command in the mod_headers module. For Nginx, please refer to the 'proxy_cookie_flags' configuration command.
What to do
Fixed builds are available from Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 24.04 | ledgersmb | Fixed | 1.6.33+ds-2.1ubuntu0.1 | UBUNTU-CVE-2021-3882 |
| Ubuntu 22.04 | ledgersmb | Fixed | 1.6.33+ds-1ubuntu0.1 | UBUNTU-CVE-2021-3882 |
| Ubuntu 20.04 | ledgersmb | Fix pending | 1.6.9+ds-1ubuntu0.1+esm1 (Ubuntu Pro) | UBUNTU-CVE-2021-3882 |
| Ubuntu 16.04 | ledgersmb | Fix pending | ||
| Ubuntu 14.04 | ledgersmb | Fix pending |
What the vendor says
As published in the CVE record by @huntrdev, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- ledgersmb/ledgersmb: affected: 1.8.0 to before unspecified, unspecified to 1.8.21
References
- https://huntr.dev/bounties/7061d97a-98a5-495a-8ba0-3a4c66091e9d
- https://github.com/ledgersmb/ledgersmb/commit/c242f5a2abf4b99b0da205473cbba034f306bfe2
- https://ledgersmb.org/cve-2021-3882-sensitive-non-secure-cookie
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.