GHSA-CHMR-RG2F-9JMF

Vulnerability from github – Published: 2023-07-25 17:17 – Updated: 2023-07-25 17:17
VLAI?
Summary
Making all attributes on a content-type public without noticing it
Details

Summary

Anyone (Strapi developers, users, plugins) can make every attribute of a Content-Type public without knowing it.

Details

When dealing with content-types inside a Strapi instance, we can extend those using the appropriate container:

strapi.container.get('content-types').extend(contentTypeUID, (contentType) => newContentType);

The vulnerability only affects the handling of content types by Strapi, not the actual content types themselves. Users can use plugins or modify their own content types without realizing that the privateAttributes getter is being removed, which can result in any attribute becoming public. This can lead to sensitive information being exposed or the entire system being taken control of by an attacker(having access to password hashes).

PoC

Extend any content type on runtime (like in the bootstrap functions) and do a copy of the content-type object.

strapi.container.get('content-types').extend(contentTypeUID, (contentType) => {
  const newCT = { ... contentType, attributes: { ...contentType.attributes, newAttr: {} } };
  return newCT;
});

This will have as effect to remove the getter and as we rely on it in sanitization, every attributes will be considered as public.

Impact

Everyone can be impacted. Depending on how people are using/extending content-types. If the users are mutating the content-type, they will not be affected.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "@strapi/strapi"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "4.10.8"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "npm",
        "name": "@strapi/utils"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "4.10.8"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "npm",
        "name": "@strapi/database"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "4.10.8"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2023-34093"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-200"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2023-07-25T17:17:12Z",
    "nvd_published_at": "2023-07-25T15:15:13Z",
    "severity": "MODERATE"
  },
  "details": "### Summary\nAnyone (Strapi developers, users, plugins) can make every attribute of a Content-Type public without knowing it.\n\n### Details\nWhen dealing with content-types inside a Strapi instance, we can extend those using the appropriate container:\n```javascript\nstrapi.container.get(\u0027content-types\u0027).extend(contentTypeUID, (contentType) =\u003e newContentType);\n```\nThe vulnerability only affects the handling of content types by Strapi, not the actual content types themselves. Users can use plugins or modify their own content types without realizing that the `privateAttributes` getter is being removed, which can result in any attribute becoming public. This can lead to sensitive information being exposed or the entire system being taken control of by an attacker(having access to password hashes).\n\n### PoC\nExtend any content type on runtime (like in the bootstrap functions) and do a copy of the content-type object.\n```javascript\nstrapi.container.get(\u0027content-types\u0027).extend(contentTypeUID, (contentType) =\u003e {\n  const newCT = { ... contentType, attributes: { ...contentType.attributes, newAttr: {} } };\n  return newCT;\n});\n```\nThis will have as effect to remove the getter and as we rely on it in sanitization, every attributes will be considered as public.\n\n### Impact\nEveryone can be impacted. Depending on how people are using/extending content-types. If the users are mutating the content-type, they will not be affected.\n",
  "id": "GHSA-chmr-rg2f-9jmf",
  "modified": "2023-07-25T17:17:12Z",
  "published": "2023-07-25T17:17:12Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/strapi/strapi/security/advisories/GHSA-chmr-rg2f-9jmf"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-34093"
    },
    {
      "type": "WEB",
      "url": "https://github.com/strapi/strapi/commit/2fa8f30371bfd1db44c15e5747860ee5789096de"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/strapi/strapi"
    },
    {
      "type": "WEB",
      "url": "https://github.com/strapi/strapi/releases/tag/v4.10.8"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:L/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Making all attributes on a content-type public without noticing it"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…