CVEMETERBack to radar
OFFICIAL RECORD · JavaScript packages

CVE-2026-27959

PUBLISHEDOfficial status check: verifiedCVSS 3.1: 7.5 · high

Koa has Host Header Injection via `ctx.hostname`

Koa is middleware for Node.js using ES2017 async functions. Prior to versions 3.1.2 and 2.16.4, Koa's `ctx.hostname` API performs naive parsing of the HTTP Host header, extracting everything before the first colon without validating the input conforms to RFC 3986 hostname syntax. When a malformed Host header containing a `@` symbol is received, `ctx.hostname` returns `evil[.]com` - an attacker-controlled value. Applications using `ctx.hostname` for URL generation, password reset links, email verification URLs, or routing decisions are vulnerable to Host header injection attacks. Versions 3.1.2 and 2.16.4 fix the issue.

Exposure status: unknown. This page does not establish whether an installed system is affected or corrected.

Severity and exploitation evidence

EPSS: 0.391% · score date 2026-11-19. EPSS is an estimated probability over the next 30 days, not proof of exploitation.

CISA KEV: not included in the checked catalog; exploitation may still occur. Last checked: 2026-11-19T17:59:58.648Z. Public exploit availability is not used to set this status.

CVSS 3.1 · 7.5 · published by GitHub_M
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Assessment source · checked 2026-11-19T12:58:19.143Z

Verification by field

FieldStatusChecked at (UTC)Source
kevverified2026-11-19T17:59:58.648ZCISA KEV
cvssverified2026-11-19T12:58:19.143ZCVE Program
epssverified2026-11-19T16:04:48.211ZFIRST EPSS
patchesverified2026-11-19T12:52:30.819ZOSV
affectedverified2026-11-19T12:58:19.143ZCVE Program
lifecycleverified2026-11-19T12:58:19.143ZCVE Program

Affected versions and configuration

koajs koa; default status: unknown: >= 3.0.0, < 3.1.2 [affected; scheme: unspecified]; < 2.16.4 [affected; scheme: unspecified]

Defaults, conditional configuration, package status and version schemes are retained below. A version range alone is not an exposure verdict.

CVE Program · cve-json · full conditions
{
  "affected": [
    {
      "vendor": "koajs",
      "product": "koa",
      "versions": [
        {
          "status": "affected",
          "version": ">= 3.0.0, < 3.1.2"
        },
        {
          "status": "affected",
          "version": "< 2.16.4"
        }
      ]
    }
  ],
  "additionalContainers": [
    {
      "title": "CISA ADP Vulnrichment",
      "metrics": [
        {
          "other": {
            "type": "ssvc",
            "content": {
              "id": "CVE-2026-27959",
              "role": "CISA Coordinator",
              "options": [
                {
                  "Exploitation": "poc"
                },
                {
                  "Automatable": "yes"
                },
                {
                  "Technical Impact": "partial"
                }
              ],
              "version": "2.0.3",
              "timestamp": "2026-02-26T19:31:17.215940Z"
            }
          }
        }
      ],
      "providerMetadata": {
        "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "shortName": "CISA-ADP",
        "dateUpdated": "2026-02-26T19:32:00.105Z"
      }
    },
    {
      "title": "koa: Koa: Host header injection vulnerability due to malformed HTTP Host header parsing",
      "metrics": [
        {
          "other": {
            "type": "Red Hat severity rating",
            "content": {
              "value": "Important",
              "namespace": "https://access.redhat.com/security/updates/classification/"
            }
          }
        },
        {
          "format": "CVSS",
          "cvssV3_1": {
            "scope": "UNCHANGED",
            "version": "3.1",
            "baseScore": 8.2,
            "attackVector": "NETWORK",
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N",
            "integrityImpact": "HIGH",
            "userInteraction": "NONE",
            "attackComplexity": "LOW",
            "availabilityImpact": "NONE",
            "privilegesRequired": "NONE",
            "confidentialityImpact": "LOW"
          }
        }
      ],
      "affected": [
        {
          "cpes": [
            "cpe:/a:redhat:openshift_ai:2.25::el9"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat OpenShift AI 2.25",
          "versions": [
            {
              "status": "unaffected",
              "version": "1776742021",
              "lessThan": "*",
              "versionType": "rpm"
            }
          ],
          "packageName": "rhoai/odh-dashboard-rhel9",
          "collectionURL": "https://catalog.redhat.com/software/containers/",
          "defaultStatus": "affected"
        },
        {
          "cpes": [
            "cpe:/a:redhat:openshift_ai:2.25::el9"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat OpenShift AI 2.25",
          "versions": [
            {
              "status": "unaffected",
              "version": "1776742141",
              "lessThan": "*",
              "versionType": "rpm"
            }
          ],
          "packageName": "rhoai/odh-mod-arch-model-registry-rhel9",
          "collectionURL": "https://catalog.redhat.com/software/containers/",
          "defaultStatus": "affected"
        },
        {
          "cpes": [
            "cpe:/a:redhat:openshift:4.19::el9"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat OpenShift Container Platform 4.19",
          "versions": [
            {
              "status": "unaffected",
              "version": "1775577192",
              "lessThan": "*",
              "versionType": "rpm"
            }
          ],
          "packageName": "openshift4/ose-monitoring-plugin-rhel9",
          "collectionURL": "https://catalog.redhat.com/software/containers/",
          "defaultStatus": "affected"
        },
        {
          "cpes": [
            "cpe:/a:redhat:rhdh:1"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat Developer Hub",
          "packageName": "rhdh/rhdh-hub-rhel9",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "defaultStatus": "affected"
        },
        {
          "cpes": [
            "cpe:/a:redhat:openshift_ai"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat OpenShift AI (RHOAI)",
          "packageName": "rhoai/odh-mod-arch-gen-ai-rhel9",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "defaultStatus": "unknown"
        },
        {
          "cpes": [
            "cpe:/a:redhat:openshift_devspaces:3"
          ],
          "vendor": "Red Hat",
          "product": "Red Hat OpenShift Dev Spaces",
          "packageName": "devspaces/code-rhel9",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "defaultStatus": "unaffected"
        },
        {
          "cpes": [
            "cpe:/a:redhat:ansible_portal:2"
          ],
          "vendor": "Red Hat",
          "product": "Self-service automation portal 2",
          "packageName": "ansible-automation-platform/automation-portal",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "defaultStatus": "affected"
        }
      ],
      "timeline": [
        {
          "lang": "en",
          "time": "2026-02-26T03:01:14.695Z",
          "value": "Reported to Red Hat."
        },
        {
          "lang": "en",
          "time": "2026-02-26T01:45:45.668Z",
          "value": "Made public."
        }
      ],
      "solutions": [
        {
          "lang": "en",
          "value": "RHSA-2026:10184: Red Hat OpenShift AI 2.25"
        },
        {
          "lang": "en",
          "value": "RHSA-2026:7249: Red Hat OpenShift Container Platform 4.19"
        }
      ],
      "x_adpType": "supplier",
      "datePublic": "2026-02-26T01:45:45.668Z",
      "references": [
        {
          "url": "https://access.redhat.com/security/cve/CVE-2026-27959",
          "tags": [
            "vdb-entry",
            "x_refsource_REDHAT"
          ]
        },
        {
          "url": "https://bugzilla.redhat.com/show_bug.cgi?id=2442928",
          "name": "RHBZ#2442928",
          "tags": [
            "issue-tracking",
            "x_refsource_REDHAT"
          ]
        },
        {
          "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-27959.json",
          "tags": [
            "x_sadp-csaf-vex"
          ]
        },
        {
          "url": "https://access.redhat.com/errata/RHSA-2026:10184",
          "tags": [
            "vendor-advisory",
            "x_refsource_REDHAT"
          ]
        },
        {
          "url": "https://access.redhat.com/errata/RHSA-2026:7249",
          "tags": [
            "vendor-advisory",
            "x_refsource_REDHAT"
          ]
        }
      ],
      "workarounds": [
        {
          "lang": "en",
          "value": "Red Hat is not aware of a practical temporary workaround that fully mitigates this issue or meets Red Hat Product Security's standards for usability, deployment, applicability, or stability. Customers are advised to apply the relevant security updates once they become available."
        }
      ],
      "x_generator": {
        "engine": "sadp-cli 1.0.0"
      },
      "descriptions": [
        {
          "lang": "en",
          "value": "A flaw was found in Koa’s ctx.hostname API used in Node.js applications. The function incorrectly parses specially crafted HTTP Host headers containing an @ character, which can cause the extracted hostname value to differ from the intended origin. An attacker can exploit this behavior by sending a malicious Host header to influence the hostname value returned by ctx.hostname. Applications that rely on this value for generating absolute URLs, password reset links, or email verification links without additional validation may be susceptible to Host header injection attacks."
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "lang": "en",
              "type": "CWE",
              "cweId": "CWE-20",
              "description": "Improper Input Validation"
            }
          ]
        }
      ],
      "providerMetadata": {
        "orgId": "0b0ca135-0b70-47e7-9f44-1890c2a1c46c",
        "shortName": "redhat-SADP",
        "dateUpdated": "2026-07-15T01:12:18.807Z"
      }
    }
  ]
}
Archived source JSON
OSV · osv · full conditions
{
  "id": "GHSA-7gcc-r8m5-44qm",
  "aliases": [
    "CVE-2026-27959"
  ],
  "affected": [
    {
      "ranges": [
        {
          "type": "SEMVER",
          "events": [
            {
              "introduced": "3.0.0"
            },
            {
              "fixed": "3.1.2"
            }
          ]
        }
      ],
      "package": {
        "name": "koa",
        "purl": "pkg:npm/koa",
        "ecosystem": "npm"
      },
      "versions": [],
      "database_specific": {
        "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/02/GHSA-7gcc-r8m5-44qm/GHSA-7gcc-r8m5-44qm.json"
      }
    },
    {
      "ranges": [
        {
          "type": "SEMVER",
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.16.4"
            }
          ]
        }
      ],
      "package": {
        "name": "koa",
        "purl": "pkg:npm/koa",
        "ecosystem": "npm"
      },
      "versions": [],
      "database_specific": {
        "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/02/GHSA-7gcc-r8m5-44qm/GHSA-7gcc-r8m5-44qm.json"
      }
    }
  ],
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
    }
  ],
  "upstream": [],
  "withdrawn": null,
  "references": [
    {
      "url": "https://github.com/koajs/koa/security/advisories/GHSA-7gcc-r8m5-44qm",
      "type": "WEB"
    },
    {
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-27959",
      "type": "ADVISORY"
    },
    {
      "url": "https://github.com/koajs/koa/commit/55ab9bab044ead4e82c70a30a4f9dc0fc9c1b6df",
      "type": "WEB"
    },
    {
      "url": "https://github.com/koajs/koa/commit/b76ddc01fdb703e51652b0fd131d16394cadcfeb",
      "type": "WEB"
    },
    {
      "url": "https://github.com/koajs/koa",
      "type": "PACKAGE"
    }
  ],
  "relatedGitRanges": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-20",
      "CWE-74"
    ],
    "severity": "HIGH",
    "github_reviewed": true,
    "nvd_published_at": "2026-02-26T02:16:23Z",
    "github_reviewed_at": "2026-02-26T22:42:57Z"
  }
}
Archived source JSON

Correction evidence

Distribution packages and upstream releases are distinct. ESM channels may require the corresponding Ubuntu entitlement. Notes and branch ranges are not installable package versions. OSV fixed boundaries are ecosystem-specific version thresholds, not proof that a package is currently available or installed.

Evidence typeDistribution / releasePackageChannelVersion or source noteSource
ecosystem-boundarynpm / packagekoaNot a distribution channel3.1.2Official record
ecosystem-boundarynpm / packagekoaNot a distribution channel2.16.4Official record

Vendor notices and operational guidance

No connected vendor notice is available for this record.

Original sources and dates

Official status history