CVE-2021-39229: Apprise Apprise Vulnerable To Regex Injection Vulnerability

HIGH
Advisory Identifier: GHSA-qhmp-h54x-38qr
CVSS 7.5
CWE-400
Published
Advisory Summary

CVE-2021-39229 is a HIGH (CVSS 7.5) apprise vulnerable to regex injection vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Apprise libraries in the PyPI ecosystem. The issue involves apprise vulnerable to regex injection with ifttt plugin. Remediation is available by upgrading affected packages to version 0.9.5.1.

CVE-2021-39229 at a Glance

CVE Identifier CVE-2021-39229
GHSA Identifier GHSA-qhmp-h54x-38qr
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Apprise
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

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:N/S:U/C:N/I:N/A:H).

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

How to Fix CVE-2021-39229

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

apprise fixed: 0.9.5.1
pip install apprise>=0.9.5.1
Verify Direct and Transitive Dependencies

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

pip show apprise

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2021-39229, inspect your installed packages using pip:

pip show apprise

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

Note: The pip show apprise command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Apprise, 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

### Impact Anyone _publicly_ hosting the Apprise library and granting them access to the IFTTT notification service. ### Patches Update to Apprise v0.9.5.1 ```bash # Install Apprise v0.9.5.1 from PyPI pip install apprise==0.9.5.1 ``` The patch to the problem was performed [here](https://github.com/caronc/apprise/pull/436/files). ### Workarounds Alternatively, if upgrading is not an option, you can safely remove the following file: - `apprise/plugins/NotifyIFTTT.py` The above will eliminate the ability to use IFTTT, but everything else will work smoothly. ### For more information If you have any questions or comments about this advisory: * Open an issue in [Apprise](https://github.com/caronc/apprise/issues) * Email me at [lead2gold@gmail.com](mailto:lead2gold@gmail.com) ### Additional Credit Github would not allow me to additionally credit **Rasmus Petersen**, but I would like to put that here at the very least - thank you for finding and reporting this issue along with those already credited ## Additional Notes: - Github would not allow me to add/tag the 2 CWE's this issue is applicable to (only CWE-400). The other is: CWE-730 (placed in the title)

CVE-2021-39229 Affected Apprise Versions

1 component(s)
Fixed Versions:
0.9.5.1
Product / Package Ecosystem Affected Versions Fixed Version
apprise
PyPI
< 0.9.5.1
0.9.5.1

References

Frequently Asked Questions

What is CVE-2021-39229?
CVE-2021-39229 is a security vulnerability in Apprise involving Apprise vulnerable to regex injection with IFTTT Plugin under CWE-400: Uncontrolled Resource Consumption.
Which Apprise versions are affected?
Affected versions include releases prior to 0.9.5.1 across affected packages: apprise.
What version fixes CVE-2021-39229?
Upgrading to 0.9.5.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is apprise affected?
Yes, apprise is affected in releases prior to 0.9.5.1. Upgrade your dependency to 0.9.5.1 or later.
What is the CVSS score of CVE-2021-39229?
CVE-2021-39229 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2021-39229?
CVE-2021-39229 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check PyPI dependencies for CVE-2021-39229?
Run the dependency tree command: 'pip show apprise'. 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-qhmp-h54x-38qr",
  "modified" : "2024-09-12T20:54:36Z",
  "published" : "2021-09-20T20:57:02Z",
  "aliases" : [ "CVE-2021-39229" ],
  "summary" : "Apprise vulnerable to regex injection with IFTTT Plugin",
  "details" : "### Impact\nAnyone _publicly_ hosting the Apprise library and granting them access to the IFTTT notification service.\n\n### Patches\nUpdate to Apprise v0.9.5.1\n   ```bash\n   # Install Apprise v0.9.5.1 from PyPI\n   pip install apprise==0.9.5.1\n   ```\n\nThe patch to the problem was performed [here](https://github.com/caronc/apprise/pull/436/files).\n\n### Workarounds\nAlternatively, if upgrading is not an option, you can safely remove the following file:\n- `apprise/plugins/NotifyIFTTT.py` \n\nThe above will eliminate the ability to use IFTTT, but everything else will work smoothly.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [Apprise](https://github.com/caronc/apprise/issues)\n* Email me at [lead2gold@gmail.com](mailto:lead2gold@gmail.com)\n\n### Additional Credit\nGithub would not allow me to additionally credit **Rasmus Petersen**, but I would like to put that here at the very least - thank you for finding and reporting this issue along with those already credited\n\n## Additional Notes:\n- Github would not allow me to add/tag the 2 CWE's this issue is applicable to (only CWE-400).  The other is: CWE-730 (placed in the title)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "apprise"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.9.5.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.9.4"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/caronc/apprise/security/advisories/GHSA-qhmp-h54x-38qr"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-39229"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/caronc/apprise/pull/436"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/caronc/apprise/commit/e20fce630d55e4ca9b0a1e325a5fea6997489831"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/caronc/apprise"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/caronc/apprise/blob/0007eade20934ddef0aba38b8f1aad980cfff253/apprise/plugins/NotifyIFTTT.py#L356-L359"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/caronc/apprise/releases/tag/v0.9.5.1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/apprise/PYSEC-2021-327.yaml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-09-20T20:30:36Z",
    "nvd_published_at" : "2021-09-20T22:15:00Z"
  }
}