# CVE-2018-5955: Missing authorization in n/a

> Unauthenticated attackers can add users to the GitStack server via the rest/user/ URI due to insufficient input filtering.

- **Severity:** Critical 9.8 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 21 Jan 2018
- **Updated:** 5 Aug 2024
- **Also known as:** GHSA-fxv2-2mqx-vqg2

## What is CVE-2018-5955?

CVE-2018-5955 is a critical missing authorization vulnerability in n/a, published on 21 Jan 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

An issue was discovered in GitStack through 2.3.10. User controlled input is not sufficiently filtered, allowing an unauthenticated attacker to add a user to the server via the username and password fields to the rest/user/ URI.

Weakness: CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2018-5955?

It affects 1 product.


Products: Smartmobilesoftware Gitstack.

## How do I fix CVE-2018-5955?

No fix has been published for CVE-2018-5955 yet. Limit exposure of the affected software until one is available.

## Is CVE-2018-5955 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2018-5955 exists.

Public exploit code:

- 一款功能强大的漏洞扫描器，子域名爆破使用aioDNS，asyncio异步快速扫描，覆盖目标全方位资产进行批量漏洞扫描，中间件信息收集，自动收集ip代理，探测Waf信息时自动使用来保护本机真实Ip，在本机Ip被Waf杀死后，自动切换代理Ip进行扫描，Waf信息收集(国内外100+款waf信息)包括安全狗，云锁，阿里云，云盾，腾讯云等，提供部分已知waf bypass 方案，中间件漏洞检测(Thinkphp,weblogic等 CVE-2018-5955,CVE-2018-12613,CVE-2018-11759等)，支持SQL注入, XSS, 命令执行,文件包含, ssrf 漏洞扫描, 支持自定义漏洞邮箱推送功能 (github_poc): https://github.com/YagamiiLight/Cerberus
- An exploit for CVE-2018-5955 GitStack 2.3.10 Unauthenticated RCE (github_poc): https://github.com/MikeTheHash/CVE-2018-5955
- GitStack - Remote Code Execution (exploitdb)
- GitStack Unauthenticated REST API Requests (metasploit)
- GitStack Unsanitized Argument RCE (metasploit)
- GitStack - Unsanitized Argument Remote Code Execution (Metasploit) (exploitdb)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-5955 and fix it if it is affected.

What it is: CVE-2018-5955 is a critical missing authorization vulnerability in n/a, published on 21 Jan 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2018-5955 exists.

Affected product: n/a. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2018-5955/ (Markdown: https://insights.sbomify.com/CVE-2018-5955/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2018-5955
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2018-5955
- OSV: https://osv.dev/vulnerability/CVE-2018-5955

---
From sbomify Insights: https://insights.sbomify.com/CVE-2018-5955/
Summaries are generated and may contain mistakes; the official description above is the record.
