☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Gogs logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 10 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H 🐛 CWE-22
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2022-1992

CVE-2022-1992 — Path Traversal in gogs/gogs
📅 PUBLISHED: 2022-06-08 00:00 UTC 🔄 UPDATED: 2026-08-13 10:06 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 2.30%
👁️
2.30% probability
57.5× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Country: Global License: Open Source
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 10.0
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: N Privileges Required None
UI: N User Interaction None
S: C Scope Changed
C: H Confidentiality High
I: H Integrity High
A: H Availability High
10.0
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2022-1992 is a critical path traversal vulnerability affecting Gogs, a popular self-hosted Git service, in all versions prior to 0.12.9. The vulnerability allows an unauthenticated remote attacker to traverse directory structures outside the intended web root, potentially reading arbitrary files from the host filesystem or overwriting files if write access is combined with the traversal primitive. With a CVSS score of 10.0, this vulnerability is rated maximum severity due to the combination of network exploitability, no authentication requirement, and potential for full confidentiality, integrity, and availability impact on the underlying server.

The affected product, Gogs, is commonly deployed as a public-facing Git repository management platform in small-to-medium enterprises and by individual developers. Any instance exposed to the internet or untrusted networks without a reverse proxy layer enforcing strict URL normalization is at risk. Given the EPSS score of 0.02300 (81.7th percentile), threat actors are actively scanning for this vulnerability class, making immediate remediation or mitigation essential.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Technical Analysis

The NVD description identifies this as a Path Traversal vulnerability (CWE-22) in the Gogs web application. Path traversal, also known as directory traversal, occurs when an application fails to properly sanitize user-supplied input used in file system operations. The attacker exploits this by injecting traversal sequences—such as ../ or encoded variants like ..%2f or ..%5c—into URL parameters, HTTP headers, or request bodies to escape the application's designated file storage directory.

For Gogs, which handles Git repository operations (including HTTP-based Git protocol endpoints, file browsing, and raw content serving), the attack surface is broad. The application processes multiple types of user input that reference file paths, including repository names, branch names, file paths within repositories, and attachment or avatar upload paths. If any of these inputs are concatenated into filesystem paths without proper validation or normalization, an attacker can manipulate them to reference arbitrary paths on the host.

The technical mechanism likely involves the web framework's routing layer passing a path parameter directly to a file-serving function such as http.ServeFile or os.Open without checking that the resolved path remains within the intended base directory. Common vulnerable patterns include:

  1. Raw file content endpoints that accept a file path parameter and serve the file's contents directly.
  2. Repository archive/download endpoints that construct zip or tarball paths from user-supplied repository names.
  3. Avatar or attachment handling code that stores and retrieves files using user-controlled filenames.

While the exact vulnerable endpoint is not disclosed in the NVD description, path traversal of this nature typically allows an attacker to read sensitive server files—such as /etc/passwd, application configuration files containing database credentials or secret keys, or SSH private keys stored on the server. If the vulnerable code path also allows write operations (e.g., writing a file to a user-chosen path via a Git hook or upload feature), the attacker could achieve remote code execution by writing a web shell or cron job.

The CVSS score of 10.0 indicates the vulnerability is remotely exploitable without authentication (AV:N/AC:L/PR:N/UI:N) and can compromise confidentiality, integrity, and availability with scope change (S:C). The integrity and availability impacts suggest the traversal may be exploitable for both file read and file write operations, or that read access to configuration files alone enables full server compromise.

Exploitation Scenarios

Reconnaissance / Target Identification: Attackers identify vulnerable Gogs instances by scanning internet-exposed ports (default HTTP port 3000, but often mapped to 80/443 behind a reverse proxy) using search engines like Shodan with queries for Gogs banners, or by sending fingerprinting HTTP requests to distinguish Gogs from GitHub Enterprise, GitLab, or other Git services. The specific version can sometimes be identified from the login page footer or by probing version-specific API endpoints.

Vulnerability Trigger: Once a target is identified, the attacker crafts HTTP requests that include traversal sequences in path parameters. Without specific endpoint details, the attack is characterized at the class level: the attacker submits a request where a path-controlling parameter (e.g., a file path in a URL segment) contains ../../../../ sequences to navigate outside the application's data directory. For example, a request to a raw-file-serving endpoint might look like:

GET /path/to/endpoint/../../../../etc/passwd

or with URL encoding to bypass naive filters:

GET /path/to/endpoint/..%2f..%2f..%2fetc%2fpasswd

Payload / Execution Method: The payload is the traversal sequence itself. If the vulnerable endpoint serves the requested file's content back in the HTTP response, the attacker receives the contents of arbitrary server files. Should the vulnerable endpoint support file writes (such as a repository file creation feature), the attacker can write a malicious file—e.g., a web shell PHP script or a cron entry—to a location outside the intended repository directory, leading to remote code execution.

Post-Exploitation Impact: Successful exploitation yields unauthorized file disclosure. Reading /etc/passwd reveals system usernames; reading the Gogs configuration file (app.ini) exposes database credentials, secret keys, and SMTP credentials; reading SSH private keys could enable lateral movement to other hosts if the Gogs service runs under a user with key access. If write primitive is available, the attacker achieves full remote code execution with the privileges of the Gogs service account, which often runs as a dedicated system user with write access to the application directory—allowing further privilege escalation or lateral movement.

Note: No public PoC or exploit code is available for this vulnerability. The attack chain described is inferred from the path traversal vulnerability class and standard exploitation techniques. Insufficient technical detail is available to specify exact vulnerable endpoints or request structures.

Impact Assessment

Business Impact: Gogs is used as a central repository for source code, often containing proprietary intellectual property, internal documentation, CI/CD pipeline definitions, and possibly production credentials in configuration files. Exploitation leads to:

  • Confidentiality breach (CVSS C:H): Exposure of source code, database credentials, environment variables, and other secrets stored on the server filesystem.
  • Integrity compromise (CVSS I:H): Potential to modify application files, inject malicious code into repositories, or tamper with server configuration if write access is achieved.
  • Availability loss (CVSS A:H): An attacker could delete critical files, corrupt the Gogs installation, or pivot to ransomware deployment if code execution is achieved.

Affected Systems: All Gogs versions prior to 0.12.9. The installed user base is significant; Gogs is a lightweight alternative to GitLab with lower system requirements, making it popular among small companies, academic institutions, and solo developers running self-hosted Git services on VPS or on-premises hardware.

Blast Radius: The vulnerability exposes the entire filesystem of the host server to an unauthenticated remote attacker. Since Gogs instances are frequently co-located with other services (e.g., databases, reverse proxies, monitoring tools), the blast radius extends to any service whose configuration or secrets reside on the same filesystem.

CVSS Context: The 10.0 critical rating reflects that exploitation requires no user interaction, no special privileges, and is network-accessible. The scope-change component (S:C) indicates that the compromised component (Gogs web application) is distinct from the security scope of the impacted resource (the entire host operating system).

Detection Guidance

Sigma Rule

title: Gogs Path Traversal Attempt (CVE-2022-1992)
id: 2f3a8d1e-9b4a-4c57-b7e2-8a1d5c9f3b21
status: experimental
description: Detects path traversal patterns in HTTP requests to Gogs instances
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2022-1992
author: Valtersit Threat Intel
date: 2024/06/01
tags:
    - attack.t1190
    - cve.2022.1992
logsource:
    category: webserver
    product: nginx
    definition: 'Web server access logs for Gogs reverse proxy'
detection:
    selection_traversal:
        cs-uri-query|contains:
            - '..%2f'
            - '..%5c'
            - '..%252f'
            - '/../'
            - '/..%2f'
    selection_gogs_path:
        cs-uri-stem|contains:
            - '/raw/'
            - '/api/v1/'
            - '/attachments/'
            - '/repo/'
    condition: selection_traversal and selection_gogs_path
    timeframe: 15m
falsepositives:
    - Legitimate applications using filesystem paths in URLs (rare)
    - API clients with unusual but valid repository names containing dots
level: high

YARA Rule

rule Gogs_Path_Traversal_CVE_2022_1992
{
    meta:
        author = "Valtersit Threat Intel"
        description = "Detects path traversal exploitation strings targeting Gogs"
        date = "2024-06-01"
        cve = "CVE-2022-1992"
        severity = "critical"
        reference = "https://nvd.nist.gov/vuln/detail/CVE-2022-1992"
    strings:
        $trav_dotdot = "/../"
        $trav_encoded1 = "..%2f"
        $trav_encoded2 = "..%5c"
        $trav_double_encoded = "..%252f"
        $trav_unicode = "..%c0%af"
        $gogs_raw = "/raw/"
        $gogs_api = "/api/v1/"
        $gogs_attachments = "/attachments/"
        $gogs_repo = "/repos/"
    condition:
        any of ($trav_*) and any of ($gogs_*)
}

Suricata IDS Rule

alert http any any -> $HOME_NET any (msg:"Gogs Path Traversal Attempt CVE-2022-1992"; flow:established,to_server; http.uri; content:"/raw/"; http.uri; content:"../"; http.uri; content:!"/raw/../"; classtype:attempted-recon; sid:20221992; rev:1; metadata:created_at 2024_06_01, cve CVE-2022-1992, severity critical;)

Elastic Detection

sequence by source.ip with maxspan=5m
  [network where destination.port in (80, 443) and
   url.path contains "/raw/" or url.path contains "/api/v1/" or url.path contains "/attachments/"]
  [network where destination.port in (80, 443) and
   (url.path contains "..%2f" or url.path contains "..%5c" or url.path contains "/../" or
    url.path contains "..%252f")]

Splunk SPL Query

index=web sourcetype=access_combined OR sourcetype=nginx:plus:access
   (uri_path IN ("/raw/*", "/api/v1/*", "/attachments/*") OR uri_path="/repo/*")
   (uri_query LIKE "%..%2f%" OR uri_query LIKE "%..%5c%" OR uri_query LIKE "%/../%" OR
    uri_query LIKE "%..%252f%")
  | stats count by src_ip, uri, status, useragent, _time
  | sort - count

Wazuh OSSEC Rule

<group name="gogs,">
  <rule id="297454" level="12">
    <if_sid>3150</if_sid> <!-- web server 4xx error -->
    <match>\.\.%2f|\.\.%5c|/\.\./|\.\.%252f</match>
    <description>Gogs path traversal attempt detected (CVE-2022-1992)</description>
    <group>attacker,t1190,</group>
    <mitre>
      <id>T1190</id>
    </mitre>
  </rule>
</group>

Mitigation & Patch Guidance

Patch Confidence: 0/4 — UNPATCHED in tracked sources. While the NVD description states the vulnerability affects versions "prior to 0.12.9," implying version 0.12.9 contains a fix, no official vendor advisory, commit reference, or patch source has been identified in tracked channels. This discrepancy should be treated with caution.

Immediate Mitigations (apply now):

  1. Restrict network access: Place Gogs behind a firewall or security group that limits access to trusted IP ranges or corporate VPN only. If internet exposure is unavoidable, restrict to specific source IPs.
  2. Reverse proxy path normalization: If using Nginx or Apache as a reverse proxy, ensure merge_slashes on; (Nginx) and disable path normalization so that traversal sequences reach the proxy layer for validation. Configure the proxy to reject requests containing ../ or encoded variants (..%2f, ..%5c) with a 400 Bad Request.
  3. WAF rule deployment: Deploy a Web Application Firewall rule that blocks GET/POST requests with traversal signatures in URI or body parameters.
  4. Filesystem permissions: Run the Gogs process as a dedicated, low-privilege user with restricted filesystem access. Ensure the Gogs data directory is the only writable directory for that user.

Patch / Upgrade Steps:

  1. If version 0.12.9 or later is available from official sources, upgrade immediately: download the new binary and replace the existing Gogs executable, or use the package manager (e.g., apt upgrade gogs, docker pull gogs/gogs:latest).
  2. Verify the upgrade by checking the version displayed in the Gogs admin panel or via /api/v1/version.
  3. After upgrade, review the Gogs changelog for any configuration changes or migration steps required.
  4. If upgrade is not possible due to custom modifications or unsupported infrastructure, treat the install as compromised and perform a full audit of server files for signs of malicious access.

Long-Term Hardening:

  1. Architecture review: Move Gogs behind an authenticated reverse proxy (e.g., oauth2-proxy) requiring SSO/multi-factor authentication before any request reaches Gogs.
  2. Network segmentation: Place Git services in a DMZ segment isolated from internal production networks; enforce egress restrictions.
  3. Credential rotation: If exposure was suspected, rotate all secrets stored on the server—database passwords, SSH keys, TLS private keys, and application secret keys (change SECRET_KEY in app.ini).
  4. Monitoring: Implement file integrity monitoring (e.g., Wazuh FIM or Tripwire) on Gogs installation and configuration files. Log and alert on unusual file access patterns.
  5. Regular patching cadence: Subscribe to Gogs security advisories and establish a 72-hour patch SLA for critical issues. Consider automated patch management.

References

  1. NVD Entry: https://nvd.nist.gov/vuln/detail/CVE-2022-1992 — Official NVD record with CNA description and vulnerability details.
  2. huntr.dev Advisory: https://huntr.com/bounties/ — Vulnerability was reported through the huntr.dev bug bounty platform (CNA: @huntrdev), per CVE metadata. Check huntr.dev listing for CVE-2022-1992.
  3. Gogs Official Site: https://gogs.io — Primary distribution channel for fixed versions; monitor release notes for version 0.12.9.
  4. Gogs GitHub Repository: https://github.com/gogs/gogs — Source code; reference for version tags and security-related commit history.
  5. CWE-22 Reference: https://cwe.mitre.org/data/definitions/22.html — MITRE CWE definition for Path Traversal, providing vulnerability class background.

Threat Actor Activity: No known threat actor campaigns have been publicly attributed to this specific CVE. The EPSS score of 0.02300 (81.7th percentile) indicates elevated exploitation likelihood, suggesting scanning activity. CISA KEV does not list this CVE. No in-the-wild exploits or PoCs have been published as of the intelligence report date.

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

title:"Gogs"
product:"gogs"
http.title:"Gogs" server:"gogs"

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2022-1992/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.