Cyber Resilience

CVE-2025-68942

XSS in Gitea ≤ 1.22.2

Published
26 December 2025
Modified
02 January 2026
Patch / advisory
CVSS Score v3.1 5.4
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
EPSS Score 0.0023 13th percentile
Risk Priority 35 floored blend · peak EPSS

Summary

CVE-2025-68942 is a medium-severity Cross-site Scripting (CWE-79) vulnerability in Gitea Gitea. Its CVSS base score is 5.4 (Medium).

Operationally, exploitation aligns with the MITRE ATT&CK technique Browser Session Hijacking (T1185); ranked at the 13th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to SI-10 (Information Input Validation) and SA-11 (Developer Testing and Evaluation) — see the control section below for these in your framework.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

Gitea before 1.22.2 allows XSS because the search input box (for creating tags and branches) is v-html instead of v-text.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise TechniquesAI

T1185 Browser Session Hijacking Collection
Adversaries may take advantage of security vulnerabilities and inherent functionality in browser software to change content, modify user-behaviors, and intercept information as part of various browser session hijacking techniques.
T1539 Steal Web Session Cookie Credential Access
An adversary may steal web application or service session cookies and use them to gain access to web applications or Internet services as an authenticated user without needing credentials.
Why these techniques?

Stored/reflected XSS in web UI directly enables browser session hijacking and theft of web session cookies via script execution in victim context.

Confidence: HIGH · MITRE ATT&CK Enterprise v19.0

CVEs Like This One

CVE-2023-27293Shared CWE-79
CVE-2023-46003Shared CWE-79
CVE-2023-5343Shared CWE-79
CVE-2023-46650Shared CWE-79
CVE-2023-49272Shared CWE-79
CVE-2023-49271Shared CWE-79
CVE-2023-46659Shared CWE-79
CVE-2023-46287Shared CWE-79
CVE-2023-49490Shared CWE-79
CVE-2023-5894Shared CWE-79

Affected Assets

gitea
gitea
≤ 1.22.2

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)
  • SI-10 Information Input Validation
  • SA-11 Developer Testing and Evaluation
  • SA-8 Security and Privacy Engineering Principles
Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V1.1.2
  • V1.3.2

Mitigating Controls (NIST 800-53 r5) AI

prevent

Directly requires validation and sanitization of untrusted input before it is rendered, preventing the unsafe v-html usage that enables this reflected/stored XSS.

prevent

Mandates developer security testing (including dynamic and static analysis) that would detect unsafe template rendering patterns such as v-html on user-controlled search fields.

prevent

Requires application of secure engineering principles (output encoding, context-aware escaping) during design and implementation, directly addressing the v-html vs. v-text mistake.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

Secure SDLC practices directly target introduction of XSS via coding standards/testing (mostly), yet the single broad outcome leaves many specific neutralization vectors unaddressed (partial).

PR.PS-02 partial match
prevents

Patching and EOL replacement can remediate known XSS instances in libraries or frameworks (partial) but do nothing to enforce input neutralization in application code (none).

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

detects

Secure-coding testing and automated code-analysis tools are applied to detect improper neutralization of script-related content during web-page generation.

prevents

Knowledge exchange on emerging attack techniques and patches reduces the likelihood that cross-site scripting flaws remain unaddressed in deployed applications.

prevents

Operational indicators of compromise for web-application attacks can be incorporated into WAF or input-filtering rules, lowering the likelihood that unsanitized data reaches the browser.

prevents

Requiring language-specific secure-coding standards and automated scanning during the SDLC catches missing output encoding or improper neutralization of untrusted data before the software reaches production.

prevents

Secure-coding standards, SAST scans and removal of insecure code samples together eliminate the failure to neutralize script content that produces cross-site scripting flaws.

none

Webpage malware scanning and block-listing of known malicious sites reduce the likelihood that reflected or stored script payloads reach a user’s browser.

References