{"id":"EUVD-2025-8839","revision":null,"records":[{"revision":"3fca3489e5874274b233862f28e69b67","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2025-30223","aliases":[],"title":"Beego allows Reflected/Stored XSS in Beego's RenderForm() Function Due to Unescaped User Input","description":"Beego is an open-source web framework for the Go programming language. Prior to 2.3.6, a Cross-Site Scripting (XSS) vulnerability exists in Beego's RenderForm() function due to improper HTML escaping of user-controlled data. This vulnerability allows attackers to inject malicious JavaScript code that executes in victims' browsers, potentially leading to session hijacking, credential theft, or account takeover. The vulnerability affects any application using Beego's RenderForm() function with user-provided data. Since it is a high-level function generating an entire form markup, many developers would assume it automatically escapes attributes (the way most frameworks do). This vulnerability is fixed in 2.3.6.","state":0,"publishedAt":"2025-03-31T16:17:05.914+00:00","modifiedAt":"2025-03-31T18:21:08.456+00:00","affected":[{"ecosystem":"Vendor product","name":"beego","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"beego\",\n                    \"product\": \"beego\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 2.3.6\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N","score":9.3,"severity":"CRITICAL"}],"references":["https://github.com/beego/beego/security/advisories/GHSA-2j42-h78h-q4fg","https://github.com/beego/beego/commit/939bb18c66406466715ddadd25dd9ffa6f169e25"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2025-30223","license":"CVE Program Terms of Use","key":"cve-program:CVE-2025-30223","identifiers":["CVE-2025-30223"]},"retained":false,"historicalAffected":[]},{"revision":"57e2c8864b6b402a9ae465c9133937eb","observedAt":"2026-11-15T03:40:36.614+00:00","statement":{"source":"euvd","id":"EUVD-2025-8839","aliases":["CVE-2025-30223","GHSA-2j42-h78h-q4fg"],"title":"Beego is an open-source web framework for the Go programming language. Prior to 2.3.6, a Cross-Site Scripting (XSS) vulnerability exists in Beego's RenderForm() function due to improper HTML escaping of user-controlled data. This vulnerabil…","description":"Beego is an open-source web framework for the Go programming language. Prior to 2.3.6, a Cross-Site Scripting (XSS) vulnerability exists in Beego's RenderForm() function due to improper HTML escaping of user-controlled data. This vulnerability allows attackers to inject malicious JavaScript code that executes in victims' browsers, potentially leading to session hijacking, credential theft, or account takeover. The vulnerability affects any application using Beego's RenderForm() function with user-provided data. Since it is a high-level function generating an entire form markup, many developers would assume it automatically escapes attributes (the way most frameworks do). This vulnerability is fixed in 2.3.6.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N","score":9.3,"severity":null}],"references":["https://github.com/beego/beego/security/advisories/GHSA-2j42-h78h-q4fg","https://github.com/beego/beego/commit/939bb18c66406466715ddadd25dd9ffa6f169e25"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2025-8839","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Mar 31, 2025, 4:17:05 PM","dateUpdated":"Mar 31, 2025, 6:21:08 PM"},"relatedAdvisories":[{"id":"openSUSE-SU-2025:14970-1","title":"govulncheck-vulndb-0.0.20250402T160203-1.1 on GA media","vulnerabilityIds":["CVE-2025-0312","CVE-2025-23391","CVE-2025-29072","CVE-2025-29868","CVE-2025-30223","CVE-2025-31135"]}],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2025-8839","identifiers":["EUVD-2025-8839","CVE-2025-30223","GHSA-2j42-h78h-q4fg"]},"retained":false,"historicalAffected":[]},{"revision":"4e2ac41e90c1483689fa4cbaf271a712","observedAt":"2026-10-25T02:24:42.386+00:00","statement":{"source":"nvd","id":"CVE-2025-30223","aliases":[],"title":"Beego is an open-source web framework for the Go programming language. Prior to 2.3.6, a Cross-Site Scripting (XSS) vulnerability exists in Beego's RenderForm() function due to improper HTML escaping of user-controlled data. This vulnerabil…","description":"Beego is an open-source web framework for the Go programming language. Prior to 2.3.6, a Cross-Site Scripting (XSS) vulnerability exists in Beego's RenderForm() function due to improper HTML escaping of user-controlled data. This vulnerability allows attackers to inject malicious JavaScript code that executes in victims' browsers, potentially leading to session hijacking, credential theft, or account takeover. The vulnerability affects any application using Beego's RenderForm() function with user-provided data. Since it is a high-level function generating an entire form markup, many developers would assume it automatically escapes attributes (the way most frameworks do). This vulnerability is fixed in 2.3.6.","state":0,"publishedAt":"2025-03-31T17:15:42.147+00:00","modifiedAt":"2026-06-17T09:08:23.193+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N","score":9.3,"severity":"CRITICAL"},{"system":"CVSS 3.1 · nvd@nist.gov · Primary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","score":9.6,"severity":"CRITICAL"}],"references":["https://github.com/beego/beego/commit/939bb18c66406466715ddadd25dd9ffa6f169e25","https://github.com/beego/beego/security/advisories/GHSA-2j42-h78h-q4fg"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2025-30223","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Analyzed","weaknesses":["CWE-79"],"productCriteria":["cpe:2.3:a:beego:beego:*:*:*:*:*:*:*:*"],"sourceDates":{"published":"2025-03-31T17:15:42.147","lastModified":"2026-06-17T09:08:23.193"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2025-30223","identifiers":["CVE-2025-30223"]},"retained":false,"historicalAffected":[]},{"revision":"cfc452b1881c4213bbe90c8721f48c5f","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-2j42-h78h-q4fg","aliases":["CVE-2025-30223","GO-2025-3585"],"title":"Beego allows Reflected/Stored XSS in Beego's RenderForm() Function Due to Unescaped User Input","description":"### Summary\n\nA Cross-Site Scripting (XSS) vulnerability exists in Beego's `RenderForm()` function due to improper HTML escaping of user-controlled data. This vulnerability allows attackers to inject malicious JavaScript code that executes in victims' browsers, potentially leading to session hijacking, credential theft, or account takeover. The vulnerability affects any application using Beego's `RenderForm()` function with user-provided data. Since it is a high-level function generating an entire form markup, many developers would assume it automatically escapes attributes (the way most frameworks do).\n\n### Details\n\nThe vulnerability is located in the `renderFormField()` function in Beego's `templatefunc.go` file (around lines 316-356). This function directly injects user-provided values into HTML without proper escaping:\n\n```go\nreturn fmt.Sprintf(`%v<input%v%v name=\"%v\" type=\"%v\" value=\"%v\"%v>`, \n    label, id, class, name, fType, value, requiredString)\n```\n\nNone of the values (label, id, class, name, value) are properly HTML-escaped before being inserted into the HTML template. This allows attackers to break out of the attribute context or inject HTML tags directly.\nThe vulnerability can be exploited in two main ways:\n\n- Attribute Injection: By injecting code into fields like DisplayName, an attacker can break out of the attribute context and execute JavaScript.\n- Content Injection: By injecting HTML tags into textarea content, an attacker can execute JavaScript.\n\nThe `RenderForm()` function returns `template.HTML`, which bypasses Go's automatic HTML escaping, making this vulnerability particularly dangerous.\n\n### PoC\n\nRetrieve the following (secret) gist: https://gist.github.com/thevilledev/8fd0cab3f098320aa9daab04be59fd2b\n\nTo run it:\n\n```go\ngo mod init beego-xss-poc\ngo mod tidy\ngo run poc.go\n```\n\nOpen your browser and navigate to http://localhost:8080/\n\nThe application demonstrates the vulnerability through several examples:\n- `/profile` - Shows a profile with malicious data in the Display Name and Bio fields\n- `/admin` - Shows multiple user profiles, including one with malicious data\n- `/submit` - Allows you to create your own profile with malicious data\n\nIn addition, you may use this Go test in `templatefunc_test.go`. The test passes, validating the vulnerability.\n\n```go\nfunc TestRenderFormXSSVulnerability(t *testing.T) {\n\ttype UserProfile struct {\n\t\tDisplayName string `form:\"displayName,text,Name:\"`\n\t\tBio         string `form:\",textarea\"`\n\t}\n\n\t// Test case 1: Attribute injection in input field\n\tmaliciousUser := UserProfile{\n\t\tDisplayName: `\" onmouseover=\"alert('XSS')\" data-malicious=\"`,\n\t\tBio:         \"Normal bio text\",\n\t}\n\n\toutput := RenderForm(&maliciousUser)\n\n\t// The vulnerable output would contain the unescaped JavaScript\n\tif !strings.Contains(string(output), `onmouseover=\"alert('XSS')\"`) {\n\t\tt.Errorf(\"Expected XSS vulnerability in attribute, but got safe output: %v\", output)\n\t}\n\n\t// Test case 2: Script injection in textarea\n\tmaliciousUser2 := UserProfile{\n\t\tDisplayName: \"Normal Name\",\n\t\tBio:         `</textarea><script>alert('XSS')</script><textarea>`,\n\t}\n\n\toutput = RenderForm(&maliciousUser2)\n\n\t// The vulnerable output would contain the unescaped script tag\n\tif !strings.Contains(string(output), `</textarea><script>alert('XSS')`) {\n\t\tt.Errorf(\"Expected XSS vulnerability in textarea content, but got safe output: %v\", output)\n\t}\n}\n```\n\n### Impact\n\nThis is a high-severity vulnerability with the following impacts:\n\n- Cross-Site Scripting (XSS): Allows execution of arbitrary JavaScript in the context of the victim's browser.\n- Session Hijacking: Attackers can steal session cookies and impersonate victims.\n- Credential Theft: Attackers can create fake login forms to steal credentials.\n- Account Takeover: Attackers can perform actions on behalf of the victim.\n- Data Exfiltration: Sensitive data visible in the browser can be stolen.\n\nThis is particularly concerning in admin panels or user management interfaces where one user's data is displayed to another user (typically an administrator).\n\n### Mitigation\n\nThe vulnerability can be fixed by properly escaping all user-provided values before inserting them into HTML, for example:\n\n```go\n// Convert value to string and escape it\nvalueStr := \"\"\nif value != nil {\n    valueStr = template.HTMLEscapeString(fmt.Sprintf(\"%v\", value))\n}\n\n// Escape the name and label\nescapedName := template.HTMLEscapeString(name)\nescapedLabel := template.HTMLEscapeString(label)\nescapedType := template.HTMLEscapeString(fType)\n\nreturn fmt.Sprintf(`%v<input%v%v name=\"%v\" type=\"%v\" value=\"%v\"%v>`, \n    escapedLabel, id, class, escapedName, escapedType, valueStr, requiredString)\n```","state":0,"publishedAt":"2025-03-31T16:55:22+00:00","modifiedAt":"2026-09-10T03:50:06.178776+00:00","affected":[{"ecosystem":"Go","name":"github.com/beego/beego/v2","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"2.3.6"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/beego/beego","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"last_affected","version":"1.12.14"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"CRITICAL"}],"references":["https://github.com/beego/beego/security/advisories/GHSA-2j42-h78h-q4fg","https://nvd.nist.gov/vuln/detail/CVE-2025-30223","https://github.com/beego/beego/commit/939bb18c66406466715ddadd25dd9ffa6f169e25","https://github.com/beego/beego","https://pkg.go.dev/vuln/GO-2025-3585"],"sourceUrl":"https://github.com/advisories/GHSA-2j42-h78h-q4fg","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-2j42-h78h-q4fg","identifiers":["GHSA-2j42-h78h-q4fg","CVE-2025-30223","GO-2025-3585"]},"retained":false,"historicalAffected":[]},{"revision":"ccb82e0f376d48ffa2b07ccc9dbb4e31","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2025-3585","aliases":["CVE-2025-30223","GHSA-2j42-h78h-q4fg"],"title":"Beego allows Reflected/Stored XSS in Beego's RenderForm() Function Due to Unescaped User Input in github.com/beego/beego","description":"Beego allows Reflected/Stored XSS in Beego's RenderForm() Function Due to Unescaped User Input in github.com/beego/beego","state":0,"publishedAt":"2025-04-01T21:40:00+00:00","modifiedAt":"2026-02-04T02:25:35.872328+00:00","affected":[{"ecosystem":"Go","name":"github.com/beego/beego","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/beego/beego/v2","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"2.3.6"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/beego/beego/security/advisories/GHSA-2j42-h78h-q4fg","https://github.com/beego/beego/commit/939bb18c66406466715ddadd25dd9ffa6f169e25"],"sourceUrl":"https://osv.dev/vulnerability/GO-2025-3585","license":"OSV · upstream source license applies","key":"osv:GO-2025-3585","identifiers":["GO-2025-3585","CVE-2025-30223","GHSA-2j42-h78h-q4fg"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-16T18:47:10.8457019+00:00","complete":true,"records":1781,"lastAttemptAt":"2026-11-16T18:47:10.8457019+00:00","lastSuccessAt":"2026-11-16T18:47:11.0716622+00:00","error":null,"lastVerifiedAt":"2026-11-16T18:47:11.071663+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-6be044d0e08779dadd136f949a536de4047af96f5d7bceb7e190ecffbb8f18ca-7b226a5dbb956f6efa40aa530e16b552d2766bd2cfeae2c8f66152d783ec78d1","complete":true,"records":426117,"lastAttemptAt":"2026-11-16T18:44:56.949882+00:00","lastSuccessAt":"2026-11-16T18:44:56.8623544+00:00","error":null,"lastVerifiedAt":"2026-11-16T18:44:56.949882+00:00","snapshotPublishedAt":"2026-11-16T18:30:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-ffcf524d3cbf41d2a3a6fa937f216dd0","complete":true,"records":13830,"lastAttemptAt":"2026-11-16T18:47:40.7926227+00:00","lastSuccessAt":"2026-11-16T18:47:40.774+00:00","error":null,"lastVerifiedAt":"2026-11-16T18:47:40.774+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13883,"expectedIdentifiers":13883,"failedIdentifiers":0},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-16T18:47:10.8457019+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-16T18:47:10.8457019+00:00","lastSuccessAt":"2026-11-16T18:47:11.0725273+00:00","error":null,"lastVerifiedAt":"2026-11-16T18:47:11.0725276+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-85ccba0af8894ad495cf1ce959f9030f","complete":false,"records":13842,"lastAttemptAt":"2026-11-16T18:47:38.4901027+00:00","lastSuccessAt":"2026-11-16T18:47:38.474+00:00","error":"209 identifier lookups failed; latest failures include HttpError (HTTP 503). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-16T18:47:38.474+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13574,"expectedIdentifiers":13883,"failedIdentifiers":209},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-64eea06dbd27de8464d5dbce1b78cc794cc59e2d901516ae0d3ea76e624cdae0","complete":true,"records":9955,"lastAttemptAt":"2026-11-16T18:47:10.7901587+00:00","lastSuccessAt":"2026-11-14T13:57:23.1208135+00:00","error":null,"lastVerifiedAt":"2026-11-16T18:47:10.7901587+00:00","snapshotPublishedAt":"2026-11-14T13:17:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-16T18:44:57.0142322+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-16T18:44:57.0142322+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-6086d649bcb454cdf302d7d9275177bda73550e1b6e446b3520e9b6266d3582c","complete":true,"records":3148,"lastAttemptAt":"2026-11-16T18:47:10.8068878+00:00","lastSuccessAt":"2026-11-15T11:05:17.1034234+00:00","error":null,"lastVerifiedAt":"2026-11-16T18:47:10.8068878+00:00","snapshotPublishedAt":"2026-11-15T10:03:04+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-a545a204cb7e029142fca3977ea456f4a00759bf811f31b6042225ef52bf5867","complete":true,"records":232531,"lastAttemptAt":"2026-11-16T18:47:10.4632154+00:00","lastSuccessAt":"2026-11-16T18:47:09.141739+00:00","error":null,"lastVerifiedAt":"2026-11-16T18:47:10.4632154+00:00","snapshotPublishedAt":"2026-11-16T18:33:19+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}