Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-49447 — cosmos-server

🟡 CVSS 5.3 — Medium ✅ No Known Exploit CWE-287 NVD
5.3
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Cosmos-Server's constellation public-devices endpoint accepts arbitrary bearer tokens

Summary

GET /cosmos/api/constellation/public-devices discloses Constellation device metadata to a requester that supplies any non-empty Authorization header. The handler strips the string Bearer from the header but never validates the resulting token and never uses it in the database query.

This was confirmed locally by routing a request through the real tokenMiddleware with Authorization: Bearer not-a-real-token. The request returned public Constellation device metadata from a disposable fixture. A missing-header negative control returned 401 Unauthorized, proving the bypass is specifically the acceptance of arbitrary bearer values.

Details

Source-to-sink path:

  • src/httpServer.go:690 registers /api/constellation/public-devices on the authenticated admin API router.
  • src/httpServer.go:815-817 applies SecureAPI(..., public=false, ...), which runs tokenMiddleware.
  • src/httpServer.go:231-237 only treats Authorization: Bearer cosmos_... as a Cosmos API token for validation. Other bearer strings are not validated by the middleware and fall through to the handler.
  • src/constellation/api_devices_public.go:42-47 checks only that the Authorization header is present.
  • src/constellation/api_devices_public.go:49-50 strips Bearer but does not verify the token or compare it with a device/API key.
  • src/constellation/api_devices_public.go:63-67 queries all non-blocked and non-invisible devices without including the stripped auth value in the filter.
  • src/constellation/api_devices_public.go:84-99 returns device names, user nicknames, cleaned VPN/internal IPs, role flags, public hostname, and port.

The handler does not call utils.CheckPermissions, utils.CheckPermissionsOrSelf, the Cosmos API-token permission check, or any Constellation-token validation before returning the data.

Default/common exposure evidence:

  • The route is registered in the standard server setup (src/httpServer.go:690).
  • Constellation is a documented product feature described as the VPN used to securely access applications remotely (readme.md:49).
  • The default config ships Constellation disabled (src/utils/utils.go:104-105), so impact requires a deployment that enables the Constellation/VPN feature and has at least one non-blocked, non-invisible device.
  • The root package identifies the product as cosmos-server version 0.22.18 (package.json:1-2).
  • The Go module is github.com/azukaar/cosmos-server (go.mod:0).

False-positive screen:

  • The PoC wraps the handler in the same tokenMiddleware used by SecureAPI, so it tests the deployed middleware behavior rather than directly calling the handler alone.
  • A request with no Authorization header returns 401 Unauthorized.
  • A request with Authorization: Bearer not-a-real-token returns 200 OK and device metadata.
  • The fixture data is stored in a disposable embedded database under t.TempDir() and no external services are contacted.
  • The route is not protected by handler-level CheckPermissions, and the arbitrary bearer value is not used by the database query.

Candidate score: 13/18. Reachability 1, attacker control 2, privilege required 2, sink impact 1, mitigation weakness 2, default exposure 1, safe PoC feasibility 2, static certainty 2, false-positive resistance 2. The lower score reflects that Constellation is disabled in the shipped default config, but it is a documented/common product feature.

Exploitability gate: confirmed for deployments with Constellation enabled and populated with devices. The reachable source, arbitrary-token bypass, data-disclosure impact, safe local reproduction, and affected-version evidence are present. Default exposure is feature-dependent rather than enabled in a fresh default config.

PoC

Clean-checkout maintainer recipe:

1. Check out commit 88de73dcca50172393a75de0e4dc3ab93622825c or version 0.22.18.

2. Create src/zz_security_poc_test.go with the following test.

3. Run go test ./src -run TestAuditPublicDevicesAllowsArbitraryBearer -count=1 -v.

4. Delete src/zz_security_poc_test.go after confirming.

```go

package main

import (

"encoding/json"

"net/http"

"net/http/httptest"

"testing"

"github.com/azukaar/cosmos-server/src/constellation"

"github.com/azukaar/cosmos-server/src/utils"

)

func TestAuditPublicDevicesAllowsArbitraryBearer(t *testing.T) {

oldConfig := utils.MainConfig

oldBaseConfig := utils.BaseMainConfig

oldPush := utils.PushShieldMetrics

oldConfigFolder := utils.CONFIGFOLDER

defer func() {

utils.MainConfig = oldConfig

utils.BaseMainConfig = oldBaseConfig

utils.PushShieldMetrics = oldPush

utils.CONFIGFOLDER = oldConfigFolder

utils.CloseEmbeddedDB()

}()

utils.PushShieldMetrics = func(string) {}

utils.MainConfig = utils.DefaultConfig

utils.MainConfig.NewInstall = false

utils.MainConfig.HTTPConfig.Hostname = "example.test"

utils.BaseMainConfig

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality low, integrity none, availability none.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: None — an unauthenticated stranger can try it.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Unchanged — the damage stays inside the vulnerable component.
  • Confidentiality impact: Low — limited, and the attacker does not choose what is affected.
  • Integrity impact: None.
  • Availability impact: None.

Weakness class

CVE-2026-49447 is classified as CWE-287: Improper Authentication. The identity of the caller is not established correctly, so an attacker can act as another user.

Affected software

CVE-2026-49447 is recorded against 2 packages.

  • github.com/azukaar/cosmos-server
  • unknown

Timeline and source

Published on 28 July 2026 and last revised on 18 August 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.

References

github.com (Web)
github.com (Web)
github.com (Package)
github.com (Web)

Other advisories for this package

github.com/azukaar/cosmos-server has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-287: Improper Authentication) in other software:

Details

Severity Medium
CVSS Score 5.3
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
CWE CWE-287
Public Exploit ✅ No
Source NVD
Published 2026-07-28
Updated 2026-08-20
Modified 2026-08-18
Fix URL N/A

Affected Packages

Software From version Fixed in
github.com/azukaar/cosmos-server — —
unknown — —

Similar Threats

Vulnerability Monitoring

Track new vulnerabilities in cosmos-server

CVE-2026-49447 is rated CVSS 5.3 Medium. BotEraser monitors your WordPress installation and notifies you when software you use appears in our vulnerability database.

Set Up Free Alerts →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026
✓