CVE-2023-36474: Github.com/projectdiscovery/interactsh Subdomain Takeover Vulnerability

MODERATE
Advisory Identifier: GHSA-m36x-mgfh-8g78
CVSS 6.1
CWE-79
Published
Advisory Summary

CVE-2023-36474 is a MODERATE (CVSS 6.1) subdomain takeover vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Github.com/projectdiscovery/interactsh libraries in the Go ecosystem. The issue involves subdomain takeover in interactsh server. Remediation is available by upgrading affected packages to version 1.0.0.

CVE-2023-36474 at a Glance

CVE Identifier CVE-2023-36474
GHSA Identifier GHSA-m36x-mgfh-8g78
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Github.com/projectdiscovery/interactsh
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2023-36474

To remediate this vulnerability, upgrade all affected Github.com/projectdiscovery/interactsh dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/projectdiscovery/interactsh fixed: 1.0.0
Upgrade github.com/projectdiscovery/interactsh to 1.0.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/projectdiscovery/interactsh

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-36474, inspect your project dependencies for Github.com/projectdiscovery/interactsh:

inspect dependencies for github.com/projectdiscovery/interactsh

Analyze the terminal output to locate any version of Github.com/projectdiscovery/interactsh in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Github.com/projectdiscovery/interactsh, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A domain configured with interactsh server was vulnerable to subdomain takeover for specfic subdomain, i.e `app`, Interactsh server before `< 1.0.0` used to create cname entries for `app` pointing to `projectdiscovery.github.io` as default which intended to used for hosting interactsh [web client](https://github.com/projectdiscovery/interactsh-web) using GitHub pages. It turns out to be a security issue with a self-hosted interactsh server in which the user may not have configured a web client but still have a cname entry pointing to GitHub pages, making them vulnerable to subdomain takeover. This issue was initially reported to us as a subdomain takeover for one of our domains that runs interactsh server by **Melih** at `security@projectdiscovery.io`, and after conducting an internal investigation, we determined that it was an issue with the default config of interactsh server affecting all the server running self-hosted instance of interactsh, as a result - cname entry has been removed in the latest release. #### Impact This allows one to host / run arbitrary client side code (XSS) in a user's browser when browsing the vulnerable subdomain, for more details on the impact, please read this [detailed blogpost](https://labs.detectify.com/2014/10/21/hostile-subdomain-takeover-using-herokugithubdesk-more/) from Detectify. #### Patches Update to [Interactsh server v1.0.0 ](https://github.com/projectdiscovery/interactsh/releases/tag/v1.0.0)with `go install -v github.com/projectdiscovery/interactsh/cmd/interactsh-server@latest` #### References https://github.com/projectdiscovery/interactsh/issues/136 #### For more information If you have any questions or comments about this advisory: * Email us at [security@projectdiscovery.io](mailto:security@projectdiscovery.io)

CVE-2023-36474 Affected Github.com/projectdiscovery/interactsh Versions

1 component(s)
Fixed Versions:
1.0.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/projectdiscovery/interactsh
Go
< 1.0.0
1.0.0

References

Frequently Asked Questions

What is CVE-2023-36474?
CVE-2023-36474 is a security vulnerability in Github.com/projectdiscovery/interactsh involving Subdomain Takeover in Interactsh server under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Github.com/projectdiscovery/interactsh versions are affected?
Affected versions include releases prior to 1.0.0 across affected packages: github.com/projectdiscovery/interactsh.
What version fixes CVE-2023-36474?
Upgrading to 1.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/projectdiscovery/interactsh affected?
Yes, github.com/projectdiscovery/interactsh is affected in releases prior to 1.0.0. Upgrade your dependency to 1.0.0 or later.
What is the CVSS score of CVE-2023-36474?
CVE-2023-36474 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2023-36474?
CVE-2023-36474 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check Go dependencies for CVE-2023-36474?
Run the dependency tree command: 'inspect dependencies for github.com/projectdiscovery/interactsh'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-m36x-mgfh-8g78",
  "modified" : "2023-07-07T16:28:46Z",
  "published" : "2022-01-27T15:15:25Z",
  "aliases" : [ "CVE-2023-36474" ],
  "summary" : "Subdomain Takeover in Interactsh server",
  "details" : "A domain configured with interactsh server was vulnerable to subdomain takeover for specfic subdomain, i.e `app`, Interactsh server before `< 1.0.0` used to create cname entries for `app` pointing to `projectdiscovery.github.io` as default which intended to used for hosting interactsh [web client](https://github.com/projectdiscovery/interactsh-web) using GitHub pages. It turns out to be a security issue with a self-hosted interactsh server in which the user may not have configured a web client but still have a cname entry pointing to GitHub pages, making them vulnerable to subdomain takeover.\n\nThis issue was initially reported to us as a subdomain takeover for one of our domains that runs interactsh server by **Melih** at `security@projectdiscovery.io`, and after conducting an internal investigation, we determined that it was an issue with the default config of interactsh server affecting all the server running self-hosted instance of interactsh, as a result - cname entry has been removed in the latest release.\n\n#### Impact\nThis allows one to host / run arbitrary client side code (XSS) in a user's browser when browsing the vulnerable subdomain, for more details on the impact, please read this [detailed blogpost](https://labs.detectify.com/2014/10/21/hostile-subdomain-takeover-using-herokugithubdesk-more/) from Detectify.\n#### Patches\nUpdate to [Interactsh server v1.0.0 ](https://github.com/projectdiscovery/interactsh/releases/tag/v1.0.0)with `go install -v github.com/projectdiscovery/interactsh/cmd/interactsh-server@latest`\n\n#### References\nhttps://github.com/projectdiscovery/interactsh/issues/136\n\n#### For more information\nIf you have any questions or comments about this advisory:\n* Email us at [security@projectdiscovery.io](mailto:security@projectdiscovery.io)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/projectdiscovery/interactsh"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/projectdiscovery/interactsh/security/advisories/GHSA-m36x-mgfh-8g78"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-36474"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/projectdiscovery/interactsh/issues/136"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/projectdiscovery/interactsh/pull/155"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/projectdiscovery/interactsh"
  }, {
    "type" : "WEB",
    "url" : "https://labs.detectify.com/2014/10/21/hostile-subdomain-takeover-using-herokugithubdesk-more"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-01-24T22:24:55Z",
    "nvd_published_at" : "2023-06-28T22:15:09Z"
  }
}