Skip to content
Heist/ feed
Back to feed
High

react — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-CVE-2023-22491

Gatsby is a free and open source framework based on React that helps developers build websites and apps. The gatsby-transformer-remark plugin prior to versions 5.25.1 and 6.3.2 passes input through to the `gray-matter` npm package, which is vulnerable to JavaScript injection in its default configuration, unless input is sanitized. The vulnerability is present in gatsby-transformer-remark when passing input in data mode (querying MarkdownRemark nodes via GraphQL). Injected JavaScript executes in the context of the build server. To exploit this vulnerability untrusted/unsanitized input would need to be sourced by or added into a file processed by gatsby-transformer-remark. A patch has been introduced in `gatsby-transformer-remark@5.25.1` and `gatsby-transformer-remark@6.3.2` which mitigates the issue by disabling the `gray-matter` JavaScript Frontmatter engine. As a workaround, if an older version of `gatsby-transformer-remark` must be used, input passed into the plugin should be sanitized ahead of processing. It is encouraged for projects to upgrade to the latest major release branch for all Gatsby plugins to ensure the latest security updates and bug fixes are received in a timely manner.

Products
react
Affected versions
0.9.4-3, 1.2.0-2build1, 1.2.0-3, 1.2.0-3build1, 1.2.0-3build2, 1.2.1-1build1, 1.2.1-1build2, 1.2.2-1, 1.2.2-1build2, 1.2.2-1build4, 1.2.2-1build5, 1.2.2-2, 1.2.2-2build1, 1.2.2-2build4, 1.2.2-2build5
Fixed versions
Not specified
CVEs
CVE-2023-22491
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 00:48 UTC · Revision 1

Source evidence

UBUNTU-CVE-2023-22491

core-osv · Original source

Published 13 Jan 2023, 19:15 UTC

Gatsby is a free and open source framework based on React that helps developers build websites and apps. The gatsby-transformer-remark plugin prior to versions 5.25.1 and 6.3.2 passes input through to the `gray-matter` npm package, which is vulnerable to JavaScript injection in its default configuration, unless input is sanitized. The vulnerability is present in gatsby-transformer-remark when passing input in data mode (querying MarkdownRemark nodes via GraphQL). Injected JavaScript executes in the context of the build server. To exploit this vulnerability untrusted/unsanitized input would need to be sourced by or added into a file processed by gatsby-transformer-remark. A patch has been introduced in `gatsby-transformer-remark@5.25.1` and `gatsby-transformer-remark@6.3.2` which mitigates the issue by disabling the `gray-matter` JavaScript Frontmatter engine. As a workaround, if an older version of `gatsby-transformer-remark` must be used, input passed into the plugin should be sanitized ahead of processing. It is encouraged for projects to upgrade to the latest major release branch for all Gatsby plugins to ensure the latest security updates and bug fixes are received in a timely manner.

osv:UBUNTU-CVE-2023-22491

react

Fixed versions: Not specified

react

Fixed versions: Not specified

react

Fixed versions: Not specified

react

Fixed versions: Not specified

react

Fixed versions: Not specified

react

Fixed versions: Not specified

react

Fixed versions: Not specified

react

Fixed versions: Not specified

Complete source record
{
  "id": "98477c3c443d7b958477e0635c944bdaa07ba469e2135af48fe585b8eb9ebdd8",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2023-22491",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2023-22491",
    "summary": "Gatsby is a free and open source framework based on React that helps developers build websites and apps. The gatsby-transformer-remark plugin prior to versions 5.25.1 and 6.3.2 passes input through to the `gray-matter` npm package, which is vulnerable to JavaScript injection in its default configuration, unless input is sanitized. The vulnerability is present in gatsby-transformer-remark when passing input in data mode (querying MarkdownRemark nodes via GraphQL). Injected JavaScript executes in the context of the build server. To exploit this vulnerability untrusted/unsanitized input would need to be sourced by or added into a file processed by gatsby-transformer-remark. A patch has been introduced in `gatsby-transformer-remark@5.25.1` and `gatsby-transformer-remark@6.3.2` which mitigates the issue by disabling the `gray-matter` JavaScript Frontmatter engine. As a workaround, if an older version of `gatsby-transformer-remark` must be used, input passed into the plugin should be sanitized ahead of processing. It is encouraged for projects to upgrade to the latest major release branch for all Gatsby plugins to ensure the latest security updates and bug fixes are received in a timely manner.",
    "evidence": "osv:UBUNTU-CVE-2023-22491",
    "products": [
      {
        "name": {
          "value": "react",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.9.4-3",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.2.0-2build1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "react",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.2.0-3",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.2.0-3build1",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "react",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.2.0-3build2",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.2.1-1build1",
            "evidence": "/affected/2/versions"
          }
        ]
      },
      {
        "name": {
          "value": "react",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.2.1-1build2",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "1.2.2-1",
            "evidence": "/affected/3/versions"
          }
        ]
      },
      {
        "name": {
          "value": "react",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.2.2-1",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "1.2.2-1build2",
            "evidence": "/affected/4/versions"
          }
        ]
      },
      {
        "name": {
          "value": "react",
          "evidence": "/affected/5/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.2.2-1build4",
            "evidence": "/affected/5/versions"
          },
          {
            "value": "1.2.2-1build5",
            "evidence": "/affected/5/versions"
          }
        ]
      },
      {
        "name": {
          "value": "react",
          "evidence": "/affected/6/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.2.2-2build4",
            "evidence": "/affected/6/versions"
          },
          {
            "value": "1.2.2-2build5",
            "evidence": "/affected/6/versions"
          }
        ]
      },
      {
        "name": {
          "value": "react",
          "evidence": "/affected/7/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.2.2-1build5",
            "evidence": "/affected/7/versions"
          },
          {
            "value": "1.2.2-2",
            "evidence": "/affected/7/versions"
          },
          {
            "value": "1.2.2-2build1",
            "evidence": "/affected/7/versions"
          },
          {
            "value": "1.2.2-2build4",
            "evidence": "/affected/7/versions"
          }
        ]
      }
    ],
    "severity": "high",
    "structured": {
      "id": "UBUNTU-CVE-2023-22491",
      "aliases": [
        "UBUNTU-CVE-2023-22491"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N"
        },
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"
        },
        {
          "type": "Ubuntu",
          "score": "medium"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "react",
            "purl": "pkg:deb/ubuntu/react?arch=source&distro=xenial",
            "ecosystem": "Ubuntu:16.04:LTS"
          },
          "versions": [
            "0.9.4-3",
            "1.2.0-2build1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-22491.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libreact-ocaml",
                "binary_version": "1.2.0-2build1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "react",
            "purl": "pkg:deb/ubuntu/react?arch=source&distro=bionic",
            "ecosystem": "Ubuntu:18.04:LTS"
          },
          "versions": [
            "1.2.0-3",
            "1.2.0-3build1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-22491.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libreact-ocaml",
                "binary_version": "1.2.0-3build1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "react",
            "purl": "pkg:deb/ubuntu/react?arch=source&distro=focal",
            "ecosystem": "Ubuntu:20.04:LTS"
          },
          "versions": [
            "1.2.0-3build2",
            "1.2.1-1build1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-22491.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libreact-ocaml",
                "binary_version": "1.2.1-1build1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "react",
            "purl": "pkg:deb/ubuntu/react?arch=source&distro=jammy",
            "ecosystem": "Ubuntu:22.04:LTS"
          },
          "versions": [
            "1.2.1-1build2",
            "1.2.2-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-22491.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libreact-ocaml",
                "binary_version": "1.2.2-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "react",
            "purl": "pkg:deb/ubuntu/react?arch=source&distro=noble",
            "ecosystem": "Ubuntu:24.04:LTS"
          },
          "versions": [
            "1.2.2-1",
            "1.2.2-1build2"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-22491.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libreact-ocaml",
                "binary_version": "1.2.2-1build2"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "react",
            "purl": "pkg:deb/ubuntu/react?arch=source&distro=questing",
            "ecosystem": "Ubuntu:25.10"
          },
          "versions": [
            "1.2.2-1build4",
            "1.2.2-1build5"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-22491.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libreact-ocaml",
                "binary_version": "1.2.2-1build5"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "react",
            "purl": "pkg:deb/ubuntu/react?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "1.2.2-2build4",
            "1.2.2-2build5"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-22491.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libreact-ocaml",
                "binary_version": "1.2.2-2build5"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "react",
            "purl": "pkg:deb/ubuntu/react?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "1.2.2-1build5",
            "1.2.2-2",
            "1.2.2-2build1",
            "1.2.2-2build4"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-22491.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libreact-ocaml",
                "binary_version": "1.2.2-2build4"
              }
            ]
          }
        }
      ],
      "modified": "2026-10-17T12:56:04.245635154Z",
      "provider": "osv",
      "upstream": [
        "CVE-2023-22491"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2023-22491",
        "https://www.cve.org/CVERecord?id=CVE-2023-22491"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2023-22491",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 354755,
  "published_at": "2023-01-13T19:15:00+00:00"
}