gsd-2023-30861
Vulnerability from gsd
Modified
2023-12-13 01:20
Details
Flask is a lightweight WSGI web application framework. When all of the following conditions are met, a response containing data intended for one client may be cached and subsequently sent by the proxy to other clients. If the proxy also caches `Set-Cookie` headers, it may send one client's `session` cookie to other clients. The severity depends on the application's use of the session and the proxy's behavior regarding cookies. The risk depends on all these conditions being met. 1. The application must be hosted behind a caching proxy that does not strip cookies or ignore responses with cookies. 2. The application sets `session.permanent = True` 3. The application does not access or modify the session at any point during a request. 4. `SESSION_REFRESH_EACH_REQUEST` enabled (the default). 5. The application does not set a `Cache-Control` header to indicate that a page is private or should not be cached. This happens because vulnerable versions of Flask only set the `Vary: Cookie` header when the session is accessed or modified, not when it is refreshed (re-sent to update the expiration) without being accessed or modified. This issue has been fixed in versions 2.3.2 and 2.2.5.
Aliases
Aliases



{
  "GSD": {
    "alias": "CVE-2023-30861",
    "id": "GSD-2023-30861"
  },
  "gsd": {
    "metadata": {
      "exploitCode": "unknown",
      "remediation": "unknown",
      "reportConfidence": "confirmed",
      "type": "vulnerability"
    },
    "osvSchema": {
      "aliases": [
        "CVE-2023-30861"
      ],
      "details": "Flask is a lightweight WSGI web application framework. When all of the following conditions are met, a response containing data intended for one client may be cached and subsequently sent by the proxy to other clients. If the proxy also caches `Set-Cookie` headers, it may send one client\u0027s `session` cookie to other clients. The severity depends on the application\u0027s use of the session and the proxy\u0027s behavior regarding cookies. The risk depends on all these conditions being met.\n\n1. The application must be hosted behind a caching proxy that does not strip cookies or ignore responses with cookies.\n2. The application sets `session.permanent = True`\n3. The application does not access or modify the session at any point during a request.\n4. `SESSION_REFRESH_EACH_REQUEST` enabled (the default).\n5. The application does not set a `Cache-Control` header to indicate that a page is private or should not be cached.\n\nThis happens because vulnerable versions of Flask only set the `Vary: Cookie` header when the session is accessed or modified, not when it is refreshed (re-sent to update the expiration) without being accessed or modified. This issue has been fixed in versions 2.3.2 and 2.2.5.",
      "id": "GSD-2023-30861",
      "modified": "2023-12-13T01:20:52.212166Z",
      "schema_version": "1.4.0"
    }
  },
  "namespaces": {
    "cve.org": {
      "CVE_data_meta": {
        "ASSIGNER": "security-advisories@github.com",
        "ID": "CVE-2023-30861",
        "STATE": "PUBLIC"
      },
      "affects": {
        "vendor": {
          "vendor_data": [
            {
              "product": {
                "product_data": [
                  {
                    "product_name": "flask",
                    "version": {
                      "version_data": [
                        {
                          "version_affected": "=",
                          "version_value": "\u003e= 2.3.0, \u003c 2.3.2"
                        },
                        {
                          "version_affected": "=",
                          "version_value": "\u003c 2.2.5"
                        }
                      ]
                    }
                  }
                ]
              },
              "vendor_name": "pallets"
            }
          ]
        }
      },
      "data_format": "MITRE",
      "data_type": "CVE",
      "data_version": "4.0",
      "description": {
        "description_data": [
          {
            "lang": "eng",
            "value": "Flask is a lightweight WSGI web application framework. When all of the following conditions are met, a response containing data intended for one client may be cached and subsequently sent by the proxy to other clients. If the proxy also caches `Set-Cookie` headers, it may send one client\u0027s `session` cookie to other clients. The severity depends on the application\u0027s use of the session and the proxy\u0027s behavior regarding cookies. The risk depends on all these conditions being met.\n\n1. The application must be hosted behind a caching proxy that does not strip cookies or ignore responses with cookies.\n2. The application sets `session.permanent = True`\n3. The application does not access or modify the session at any point during a request.\n4. `SESSION_REFRESH_EACH_REQUEST` enabled (the default).\n5. The application does not set a `Cache-Control` header to indicate that a page is private or should not be cached.\n\nThis happens because vulnerable versions of Flask only set the `Vary: Cookie` header when the session is accessed or modified, not when it is refreshed (re-sent to update the expiration) without being accessed or modified. This issue has been fixed in versions 2.3.2 and 2.2.5."
          }
        ]
      },
      "impact": {
        "cvss": [
          {
            "attackComplexity": "LOW",
            "attackVector": "NETWORK",
            "availabilityImpact": "NONE",
            "baseScore": 7.5,
            "baseSeverity": "HIGH",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "NONE",
            "privilegesRequired": "NONE",
            "scope": "UNCHANGED",
            "userInteraction": "NONE",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
            "version": "3.1"
          }
        ]
      },
      "problemtype": {
        "problemtype_data": [
          {
            "description": [
              {
                "cweId": "CWE-539",
                "lang": "eng",
                "value": "CWE-539: Use of Persistent Cookies Containing Sensitive Information"
              }
            ]
          }
        ]
      },
      "references": {
        "reference_data": [
          {
            "name": "https://github.com/pallets/flask/security/advisories/GHSA-m2qf-hxjv-5gpq",
            "refsource": "MISC",
            "url": "https://github.com/pallets/flask/security/advisories/GHSA-m2qf-hxjv-5gpq"
          },
          {
            "name": "https://github.com/pallets/flask/commit/70f906c51ce49c485f1d355703e9cc3386b1cc2b",
            "refsource": "MISC",
            "url": "https://github.com/pallets/flask/commit/70f906c51ce49c485f1d355703e9cc3386b1cc2b"
          },
          {
            "name": "https://github.com/pallets/flask/commit/afd63b16170b7c047f5758eb910c416511e9c965",
            "refsource": "MISC",
            "url": "https://github.com/pallets/flask/commit/afd63b16170b7c047f5758eb910c416511e9c965"
          },
          {
            "name": "https://github.com/pallets/flask/releases/tag/2.2.5",
            "refsource": "MISC",
            "url": "https://github.com/pallets/flask/releases/tag/2.2.5"
          },
          {
            "name": "https://github.com/pallets/flask/releases/tag/2.3.2",
            "refsource": "MISC",
            "url": "https://github.com/pallets/flask/releases/tag/2.3.2"
          },
          {
            "name": "https://www.debian.org/security/2023/dsa-5442",
            "refsource": "MISC",
            "url": "https://www.debian.org/security/2023/dsa-5442"
          },
          {
            "name": "https://security.netapp.com/advisory/ntap-20230818-0006/",
            "refsource": "MISC",
            "url": "https://security.netapp.com/advisory/ntap-20230818-0006/"
          },
          {
            "name": "https://lists.debian.org/debian-lts-announce/2023/08/msg00024.html",
            "refsource": "MISC",
            "url": "https://lists.debian.org/debian-lts-announce/2023/08/msg00024.html"
          }
        ]
      },
      "source": {
        "advisory": "GHSA-m2qf-hxjv-5gpq",
        "discovery": "UNKNOWN"
      }
    },
    "gitlab.com": {
      "advisories": [
        {
          "affected_range": "\u003c2.2.5||\u003e=2.3.0,\u003c2.3.2",
          "affected_versions": "All versions before 2.2.5, all versions starting from 2.3.0 before 2.3.2",
          "cvss_v3": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
          "cwe_ids": [
            "CWE-1035",
            "CWE-539",
            "CWE-937"
          ],
          "date": "2023-08-20",
          "description": "When all of the following conditions are met, a response containing data intended for one client may be cached and subsequently sent by a proxy to other clients. If the proxy also caches `Set-Cookie` headers, it may send one client\u0027s `session` cookie to other clients. The severity depends on the application\u0027s use of the session, and the proxy\u0027s behavior regarding cookies. The risk depends on _all_ these conditions being met.\n\n1. The application must be hosted behind a caching proxy that does not strip cookies or ignore responses with cookies.\n2. The application sets [`session.permanent = True`](https://flask.palletsprojects.com/en/2.3.x/api/#flask.session.permanent).\n2. The application does not access or modify the session at any point during a request.\n4. [`SESSION_REFRESH_EACH_REQUEST`](https://flask.palletsprojects.com/en/2.3.x/config/#SESSION_REFRESH_EACH_REQUEST) is enabled (the default).\n5. The application does not set a `Cache-Control` header to indicate that a page is private or should not be cached.\n\nThis happens because vulnerable versions of Flask only set the `Vary: Cookie` header when the session is accessed or modified, not when it is refreshed (re-sent to update the expiration) without being accessed or modified.",
          "fixed_versions": [
            "2.2.5",
            "2.3.2"
          ],
          "identifier": "CVE-2023-30861",
          "identifiers": [
            "CVE-2023-30861",
            "GHSA-m2qf-hxjv-5gpq"
          ],
          "not_impacted": "All versions starting from 2.2.5 before 2.3.0, all versions starting from 2.3.2",
          "package_slug": "pypi/Flask",
          "pubdate": "2023-05-02",
          "solution": "Upgrade to versions 2.2.5, 2.3.2 or above.",
          "title": "Flask vulnerable to possible disclosure of permanent session cookie due to missing Vary: Cookie header",
          "urls": [
            "https://github.com/pallets/flask/security/advisories/GHSA-m2qf-hxjv-5gpq",
            "https://github.com/pallets/flask/commit/70f906c51ce49c485f1d355703e9cc3386b1cc2b",
            "https://github.com/pallets/flask/releases/tag/2.3.2",
            "https://github.com/advisories/GHSA-m2qf-hxjv-5gpq"
          ],
          "uuid": "1765d1bd-56e7-4808-8901-6b704956a89b"
        }
      ]
    },
    "nvd.nist.gov": {
      "configurations": {
        "CVE_data_version": "4.0",
        "nodes": [
          {
            "children": [],
            "cpe_match": [
              {
                "cpe23Uri": "cpe:2.3:a:palletsprojects:flask:*:*:*:*:*:*:*:*",
                "cpe_name": [],
                "versionEndExcluding": "2.2.5",
                "vulnerable": true
              },
              {
                "cpe23Uri": "cpe:2.3:a:palletsprojects:flask:*:*:*:*:*:*:*:*",
                "cpe_name": [],
                "versionEndExcluding": "2.3.2",
                "versionStartIncluding": "2.3.0",
                "vulnerable": true
              }
            ],
            "operator": "OR"
          }
        ]
      },
      "cve": {
        "CVE_data_meta": {
          "ASSIGNER": "security-advisories@github.com",
          "ID": "CVE-2023-30861"
        },
        "data_format": "MITRE",
        "data_type": "CVE",
        "data_version": "4.0",
        "description": {
          "description_data": [
            {
              "lang": "en",
              "value": "Flask is a lightweight WSGI web application framework. When all of the following conditions are met, a response containing data intended for one client may be cached and subsequently sent by the proxy to other clients. If the proxy also caches `Set-Cookie` headers, it may send one client\u0027s `session` cookie to other clients. The severity depends on the application\u0027s use of the session and the proxy\u0027s behavior regarding cookies. The risk depends on all these conditions being met.\n\n1. The application must be hosted behind a caching proxy that does not strip cookies or ignore responses with cookies.\n2. The application sets `session.permanent = True`\n3. The application does not access or modify the session at any point during a request.\n4. `SESSION_REFRESH_EACH_REQUEST` enabled (the default).\n5. The application does not set a `Cache-Control` header to indicate that a page is private or should not be cached.\n\nThis happens because vulnerable versions of Flask only set the `Vary: Cookie` header when the session is accessed or modified, not when it is refreshed (re-sent to update the expiration) without being accessed or modified. This issue has been fixed in versions 2.3.2 and 2.2.5."
            }
          ]
        },
        "problemtype": {
          "problemtype_data": [
            {
              "description": [
                {
                  "lang": "en",
                  "value": "CWE-539"
                }
              ]
            }
          ]
        },
        "references": {
          "reference_data": [
            {
              "name": "https://github.com/pallets/flask/commit/70f906c51ce49c485f1d355703e9cc3386b1cc2b",
              "refsource": "MISC",
              "tags": [
                "Patch"
              ],
              "url": "https://github.com/pallets/flask/commit/70f906c51ce49c485f1d355703e9cc3386b1cc2b"
            },
            {
              "name": "https://github.com/pallets/flask/releases/tag/2.3.2",
              "refsource": "MISC",
              "tags": [
                "Release Notes"
              ],
              "url": "https://github.com/pallets/flask/releases/tag/2.3.2"
            },
            {
              "name": "https://github.com/pallets/flask/releases/tag/2.2.5",
              "refsource": "MISC",
              "tags": [
                "Release Notes"
              ],
              "url": "https://github.com/pallets/flask/releases/tag/2.2.5"
            },
            {
              "name": "https://github.com/pallets/flask/security/advisories/GHSA-m2qf-hxjv-5gpq",
              "refsource": "MISC",
              "tags": [
                "Vendor Advisory"
              ],
              "url": "https://github.com/pallets/flask/security/advisories/GHSA-m2qf-hxjv-5gpq"
            },
            {
              "name": "https://github.com/pallets/flask/commit/afd63b16170b7c047f5758eb910c416511e9c965",
              "refsource": "MISC",
              "tags": [
                "Patch"
              ],
              "url": "https://github.com/pallets/flask/commit/afd63b16170b7c047f5758eb910c416511e9c965"
            },
            {
              "name": "https://www.debian.org/security/2023/dsa-5442",
              "refsource": "MISC",
              "tags": [],
              "url": "https://www.debian.org/security/2023/dsa-5442"
            },
            {
              "name": "https://security.netapp.com/advisory/ntap-20230818-0006/",
              "refsource": "MISC",
              "tags": [],
              "url": "https://security.netapp.com/advisory/ntap-20230818-0006/"
            },
            {
              "name": "https://lists.debian.org/debian-lts-announce/2023/08/msg00024.html",
              "refsource": "MISC",
              "tags": [],
              "url": "https://lists.debian.org/debian-lts-announce/2023/08/msg00024.html"
            }
          ]
        }
      },
      "impact": {
        "baseMetricV3": {
          "cvssV3": {
            "attackComplexity": "LOW",
            "attackVector": "NETWORK",
            "availabilityImpact": "NONE",
            "baseScore": 7.5,
            "baseSeverity": "HIGH",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "NONE",
            "privilegesRequired": "NONE",
            "scope": "UNCHANGED",
            "userInteraction": "NONE",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
            "version": "3.1"
          },
          "exploitabilityScore": 3.9,
          "impactScore": 3.6
        }
      },
      "lastModifiedDate": "2023-08-20T21:15Z",
      "publishedDate": "2023-05-02T18:15Z"
    }
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading...

Loading...