CVE-2021-36804: Akaunting/akaunting Malicious Password-reset Vulnerability

HIGH
Advisory Identifier: GHSA-246r-r2wf-frhx
CVSS 8.1
CWE-640
Published
Advisory Summary

CVE-2021-36804 is a HIGH (CVSS 8.1) malicious password-reset vulnerability (CWE-640: Weak Password Recovery Mechanism for Forgotten Password) affecting Akaunting/akaunting libraries in the Packagist ecosystem. The issue involves malicious password-reset in akaunting. Remediation is available by upgrading affected packages to version 2.1.13.

CVE-2021-36804 at a Glance

CVE Identifier CVE-2021-36804
GHSA Identifier GHSA-246r-r2wf-frhx
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-640: Weak Password Recovery Mechanism for Forgotten Password
Affected Product Akaunting/akaunting
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2021-36804

To remediate this vulnerability, upgrade all affected Akaunting/akaunting dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

akaunting/akaunting fixed: 2.1.13
Upgrade akaunting/akaunting to 2.1.13
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for akaunting/akaunting

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-36804, inspect your project dependencies for Akaunting/akaunting:

inspect dependencies for akaunting/akaunting

Analyze the terminal output to locate any version of Akaunting/akaunting in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.13), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-640: Weak Password Recovery Mechanism for Forgotten Password, where the product contains a mechanism for users to recover or change their passwords without knowing the original password, but the mechanism is weak. In Akaunting/akaunting, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Akaunting version 2.1.12 and earlier suffers from a password reset spoofing vulnerability, wherein an attacker can proxy password reset requests through a running Akaunting instance, if that attacker knows the target's e-mail address. This issue was fixed in version 2.1.13 of the product. Please note that this issue is ultimately caused by the defaults provided by the Laravel framework, specifically how proxy headers are handled with respect to multi-tenant implementations. In other words, while this is not technically a vulnerability in Laravel, this default configuration is very likely to lead to practically identical identical vulnerabilities in Laravel projects that implement multi-tenant applications.

CVE-2021-36804 Affected Akaunting/akaunting Versions

1 component(s)
Fixed Versions:
2.1.13
Product / Package Ecosystem Affected Versions Fixed Version
akaunting/akaunting
Packagist
< 2.1.13
2.1.13

References

Frequently Asked Questions

What is CVE-2021-36804?
CVE-2021-36804 is a security vulnerability in Akaunting/akaunting involving Malicious password-reset in Akaunting under CWE-640: Weak Password Recovery Mechanism for Forgotten Password.
Which Akaunting/akaunting versions are affected?
Affected versions include releases prior to 2.1.13 across affected packages: akaunting/akaunting.
What version fixes CVE-2021-36804?
Upgrading to 2.1.13 (or the latest patched release for your respective branch) resolves the vulnerability.
Is akaunting/akaunting affected?
Yes, akaunting/akaunting is affected in releases prior to 2.1.13. Upgrade your dependency to 2.1.13 or later.
What is the CVSS score of CVE-2021-36804?
CVE-2021-36804 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2021-36804?
CVE-2021-36804 is classified under CWE-640: Weak Password Recovery Mechanism for Forgotten Password (The product contains a mechanism for users to recover or change their passwords without knowing the original password, but the mechanism is weak.).
How can I check Packagist dependencies for CVE-2021-36804?
Run the dependency tree command: 'inspect dependencies for akaunting/akaunting'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-246r-r2wf-frhx",
  "modified" : "2021-09-03T15:58:46Z",
  "published" : "2021-09-01T18:31:36Z",
  "aliases" : [ "CVE-2021-36804" ],
  "summary" : "Malicious password-reset in Akaunting",
  "details" : "Akaunting version 2.1.12 and earlier suffers from a password reset spoofing vulnerability, wherein an attacker can proxy password reset requests through a running Akaunting instance, if that attacker knows the target's e-mail address. This issue was fixed in version 2.1.13 of the product. Please note that this issue is ultimately caused by the defaults provided by the Laravel framework, specifically how proxy headers are handled with respect to multi-tenant implementations. In other words, while this is not technically a vulnerability in Laravel, this default configuration is very likely to lead to practically identical identical vulnerabilities in Laravel projects that implement multi-tenant applications.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "akaunting/akaunting"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.1.13"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-36804"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/laravel/laravel/pull/5477"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/laravel/laravel"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/laravel/laravel/blob/75a7dba9c44ce3555cc57dd1826467839fd9774f/CHANGELOG.md#v844-2020-12-01"
  }, {
    "type" : "WEB",
    "url" : "https://www.laravel-enlightn.com/docs/security/host-injection-analyzer.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.rapid7.com/blog/post/2021/07/27/multiple-open-source-web-app-vulnerabilities-fixed"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-640" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-08-30T21:34:44Z",
    "nvd_published_at" : "2021-08-04T23:15:00Z"
  }
}