Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-21317

uap-core in an open-source npm package which contains the core of BrowserScope's original user agent string parser. In uap-core before version 0.11.0, some regexes are vulnerable to regular expression denial of service (REDoS) due to overlapping capture groups. This allows remote attackers to overload a server by setting the User-Agent header in an HTTP(S) request to maliciously crafted long strings. This is fixed in version 0.11.0. Downstream packages such as uap-python, uap-ruby etc which depend upon uap-core follow different version schemes.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-21317
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 11:32 UTC · Revision 1

Source evidence

CVE-2021-21317

core-osv · Original source

Published 16 Feb 2021, 18:15 UTC

uap-core in an open-source npm package which contains the core of BrowserScope's original user agent string parser. In uap-core before version 0.11.0, some regexes are vulnerable to regular expression denial of service (REDoS) due to overlapping capture groups. This allows remote attackers to overload a server by setting the User-Agent header in an HTTP(S) request to maliciously crafted long strings. This is fixed in version 0.11.0. Downstream packages such as uap-python, uap-ruby etc which depend upon uap-core follow different version schemes.

osv:CVE-2021-21317
Complete source record
{
  "id": "847a912f601839bf24741a9924062ba106dfd3ab3ea8fce3f8b472f3368bbd08",
  "url": "https://osv.dev/vulnerability/CVE-2021-21317",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-21317",
    "summary": "uap-core in an open-source npm package which contains the core of BrowserScope's original user agent string parser. In uap-core before version 0.11.0, some regexes are vulnerable to regular expression denial of service (REDoS) due to overlapping capture groups. This allows remote attackers to overload a server by setting the User-Agent header in an HTTP(S) request to maliciously crafted long strings. This is fixed in version 0.11.0. Downstream packages such as uap-python, uap-ruby etc which depend upon uap-core follow different version schemes.",
    "evidence": "osv:CVE-2021-21317",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2021-21317",
      "aliases": [
        "CVE-2021-21317",
        "GHSA-p4pj-mg4r-x6v4"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/ua-parser/uap-core",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "01ccff6ccaaa9216405da120636a35fe38286bae"
                },
                {
                  "fixed": "dc9925d458214cfe87b93e35346980612f6ae96c"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:uap-core_project:uap-core:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "0.11.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "dc9925d458214cfe87b93e35346980612f6ae96c"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v0.10.0",
            "v0.9.0",
            "v0.8.0",
            "v0.6.11",
            "v0.7.3",
            "v0.7.2",
            "v0.7.1",
            "v0.7.0",
            "v0.6.9",
            "v0.6.8",
            "v0.6.7",
            "v0.6.6",
            "v0.6.5",
            "v0.6.4",
            "v0.6.3",
            "v0.6.2",
            "v0.6.1",
            "v0.6.0",
            "v0.3.4",
            "php-3.3",
            "java-1.3.0",
            "java-1.2.2",
            "v0.3.2",
            "v0.3.1",
            "v0.3.0",
            "v0.2.4",
            "v0.2.3",
            "v0.2.2",
            "v0.2.1",
            "v0.2.0",
            "v0.1.1",
            "v0.1.0",
            "semver"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-21317.json"
          }
        }
      ],
      "modified": "2026-10-20T10:54:28.067000016Z",
      "provider": "osv",
      "references": [
        "https://github.com/ua-parser/uap-core/security/advisories/GHSA-p4pj-mg4r-x6v4",
        "https://www.npmjs.com/package/uap-core",
        "https://github.com/ua-parser/uap-core/commit/dc9925d458214cfe87b93e35346980612f6ae96c"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-21317",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 385400,
  "published_at": "2021-02-16T18:15:12.583+00:00"
}