data/reports: add GO-2024-2604.yaml

Aliases: CVE-2024-27302, GHSA-fgxv-gw55-r5fq

Fixes golang/vulndb#2604

Change-Id: I555a5fb9c8bcb8d960b5f3d3b3445230866fcd73
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/570715
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Maceo Thompson <maceothompson@google.com>
Reviewed-by: Tatiana Bradley <tatianabradley@google.com>
diff --git a/data/osv/GO-2024-2604.json b/data/osv/GO-2024-2604.json
new file mode 100644
index 0000000..9cc83ff
--- /dev/null
+++ b/data/osv/GO-2024-2604.json
@@ -0,0 +1,61 @@
+{
+  "schema_version": "1.3.1",
+  "id": "GO-2024-2604",
+  "modified": "0001-01-01T00:00:00Z",
+  "published": "0001-01-01T00:00:00Z",
+  "aliases": [
+    "CVE-2024-27302",
+    "GHSA-fgxv-gw55-r5fq"
+  ],
+  "summary": "CORS Filter bypass in github.com/zeromicro/go-zero",
+  "details": "The CORS Filter feature in go-zero allows users to specify an array of domains allowed in the CORS policy. However, the isOriginAllowed function uses strings.HasSuffix to check the origin, which can lead to a bypass via a domain like \"evil-victim.com\". This vulnerability is capable of breaking CORS policy and thus allowing any page to make requests and retrieve data on behalf of other users.",
+  "affected": [
+    {
+      "package": {
+        "name": "github.com/zeromicro/go-zero",
+        "ecosystem": "Go"
+      },
+      "ranges": [
+        {
+          "type": "SEMVER",
+          "events": [
+            {
+              "introduced": "0"
+            },
+            {
+              "fixed": "1.4.4"
+            }
+          ]
+        }
+      ],
+      "ecosystem_specific": {
+        "imports": [
+          {
+            "path": "github.com/zeromicro/go-zero/rest/internal/cors",
+            "symbols": [
+              "isOriginAllowed"
+            ]
+          }
+        ]
+      }
+    }
+  ],
+  "references": [
+    {
+      "type": "ADVISORY",
+      "url": "https://github.com/zeromicro/go-zero/security/advisories/GHSA-fgxv-gw55-r5fq"
+    },
+    {
+      "type": "FIX",
+      "url": "https://github.com/zeromicro/go-zero/commit/d9d79e930dff6218a873f4f02115df61c38b15db"
+    }
+  ],
+  "credits": [
+    {
+      "name": "cokeBeer"
+    }
+  ],
+  "database_specific": {
+    "url": "https://pkg.go.dev/vuln/GO-2024-2604"
+  }
+}
\ No newline at end of file
diff --git a/data/reports/GO-2024-2604.yaml b/data/reports/GO-2024-2604.yaml
new file mode 100644
index 0000000..761bb4b
--- /dev/null
+++ b/data/reports/GO-2024-2604.yaml
@@ -0,0 +1,27 @@
+id: GO-2024-2604
+modules:
+    - module: github.com/zeromicro/go-zero
+      versions:
+        - fixed: 1.4.4
+      vulnerable_at: 1.4.3
+      packages:
+        - package: github.com/zeromicro/go-zero/rest/internal/cors
+          symbols:
+            - isOriginAllowed
+summary: CORS Filter bypass in github.com/zeromicro/go-zero
+description: |-
+    The CORS Filter feature in go-zero allows users to specify an array of domains
+    allowed in the CORS policy. However, the isOriginAllowed function uses
+    strings.HasSuffix to check the origin, which can lead to a bypass via a domain
+    like "evil-victim.com". This vulnerability is capable of breaking CORS policy
+    and thus allowing any page to make requests and retrieve data on behalf of other
+    users.
+cves:
+    - CVE-2024-27302
+ghsas:
+    - GHSA-fgxv-gw55-r5fq
+credits:
+    - cokeBeer
+references:
+    - advisory: https://github.com/zeromicro/go-zero/security/advisories/GHSA-fgxv-gw55-r5fq
+    - fix: https://github.com/zeromicro/go-zero/commit/d9d79e930dff6218a873f4f02115df61c38b15db