CVE-2017-18638: Graphite web Graphite.composer.views.send_email Vulnerable To SSRF Vulnerability

HIGH
Advisory Identifier: GHSA-vfj6-275q-4pvm
CVSS 7.5
CWE-918
Published
Advisory Summary

CVE-2017-18638 is a HIGH (CVSS 7.5) graphite.composer.views.send_email vulnerable to ssrf vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Graphite web libraries in the PyPI ecosystem. The issue involves graphite.composer.views.send_email vulnerable to ssrf. Remediation is available by upgrading affected packages to version 1.1.6.

CVE-2017-18638 at a Glance

CVE Identifier CVE-2017-18638
GHSA Identifier GHSA-vfj6-275q-4pvm
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Graphite web
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:H/I:N/A:N).

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 High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2017-18638

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

graphite-web fixed: 1.1.6
pip install graphite-web>=1.1.6
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 graphite-web

How to Check if You Are Affected

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

pip show graphite-web

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Graphite web, 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 send_email in graphite-web/webapp/graphite/composer/views.py in Graphite through 1.1.5 is vulnerable to SSRF. The vulnerable SSRF endpoint can be used by an attacker to have the Graphite web server request any resource. The response to this SSRF request is encoded into an image file and then sent to an e-mail address that can be supplied by the attacker. Thus, an attacker can exfiltrate any information. Email will be send through SMTP server configured in Graphite, by default it's 'localhost' ### Patches Problem was patched in Graphite-web 1.1.6. Also patches was released for graphite-web [1.0.x](https://github.com/graphite-project/graphite-web/pull/2501) and [0.9.x](https://github.com/graphite-project/graphite-web/pull/2500), and we'll discuss releases of non-supported branches later. ### Workarounds You can manually remove function `send_email` from file `webapp/graphite/composer/views.py`. This function are not in use and will not affect your Graphite installation. ### References For more information check this graphite-web Github issue #2008 ### For more information If you have any questions or comments about this advisory: * Add comment in [issue #2008](https://github.com/graphite-project/graphite-web/issues/2008)

CVE-2017-18638 Affected Graphite web Versions

1 component(s)
Fixed Versions:
1.1.6
Product / Package Ecosystem Affected Versions Fixed Version
graphite-web
PyPI
< 1.1.6
1.1.6

References

Frequently Asked Questions

What is CVE-2017-18638?
CVE-2017-18638 is a security vulnerability in Graphite web involving graphite.composer.views.send_email vulnerable to SSRF under CWE-918: Server-Side Request Forgery (SSRF).
Which Graphite web versions are affected?
Affected versions include releases prior to 1.1.6 across affected packages: graphite-web.
What version fixes CVE-2017-18638?
Upgrading to 1.1.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is graphite-web affected?
Yes, graphite-web is affected in releases prior to 1.1.6. Upgrade your dependency to 1.1.6 or later.
What is the CVSS score of CVE-2017-18638?
CVE-2017-18638 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:H/I:N/A:N.
What CWE is associated with CVE-2017-18638?
CVE-2017-18638 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check PyPI dependencies for CVE-2017-18638?
Run the dependency tree command: 'pip show graphite-web'. 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-vfj6-275q-4pvm",
  "modified" : "2024-09-20T21:42:27Z",
  "published" : "2019-10-25T13:55:20Z",
  "aliases" : [ "CVE-2017-18638" ],
  "summary" : "graphite.composer.views.send_email vulnerable to SSRF",
  "details" : "### Impact\nsend_email in graphite-web/webapp/graphite/composer/views.py in Graphite through 1.1.5 is vulnerable to SSRF. The vulnerable SSRF endpoint can be used by an attacker to have the Graphite web server request any resource. The response to this SSRF request is encoded into an image file and then sent to an e-mail address that can be supplied by the attacker. Thus, an attacker can exfiltrate any information. Email will be send through SMTP server configured in Graphite, by default it's 'localhost'\n\n### Patches\nProblem was patched in Graphite-web 1.1.6. Also patches was released for graphite-web [1.0.x](https://github.com/graphite-project/graphite-web/pull/2501) and [0.9.x](https://github.com/graphite-project/graphite-web/pull/2500), and we'll discuss releases of non-supported branches later.\n\n### Workarounds\nYou can manually remove function `send_email` from file `webapp/graphite/composer/views.py`. This function are not in use and will not affect your Graphite installation.\n\n### References\nFor more information check this graphite-web Github issue #2008 \n\n### For more information\nIf you have any questions or comments about this advisory:\n* Add comment in [issue #2008](https://github.com/graphite-project/graphite-web/issues/2008)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "graphite-web"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.1.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/graphite-project/graphite-web/security/advisories/GHSA-vfj6-275q-4pvm"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-18638"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/graphite-project/graphite-web/issues/2008"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/graphite-project/graphite-web/pull/2499"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/graphite-project/graphite-web/commit/71726a0e41a5263f49b973a7b856505a5b931c1f"
  }, {
    "type" : "WEB",
    "url" : "https://blog.orange.tw/2017/07/how-i-chained-4-vulnerabilities-on.html#second-bug-internal-graphite-ssrf"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/graphite-project/graphite-web"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/graphite-web/PYSEC-2019-151.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2019/10/msg00030.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.youtube.com/watch?v=ds4Gp4xoaeA"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-03T23:34:36Z",
    "nvd_published_at" : null
  }
}