Common Weakness Enumeration

CWE-668

Weakness Discouraged

Exposure of Resource to Wrong Sphere

Abstraction: Class · Status: Draft

The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource.

Resources such as files and directories may be inadvertently exposed through mechanisms such as insecure permissions, or when a program accidentally operates on the wrong object. For example, a program may intend that private files can only be provided to a specific user. This effectively defines a control sphere that is intended to prevent attackers from accessing these private files. If the file permissions are insecure, then parties other than the user will be able to access those files.

A separate control sphere might effectively require that the user can only access the private files, but not any other files on the system. If the program does not ensure that the user is only requesting private files, then the user might be able to access other files on the system.

In either case, the end result is that a resource has been exposed to the wrong party.

Mapping guidance

CWE-668 is high-level and is often misused as a catch-all when lower-level children might be applicable. It is sometimes used for low-information vulnerability reports [REF-1287]. It is a level-1 Class (i.e., a child of a Pillar). It is not useful for trend analysis.

Frequent misuse appears to be related to access control issues (poor authorization (CWE-285) or authentication (CWE-287)); insertion of sensitive information (CWE-201) or improper removal of sensitive information (CWE-212); insecure permissions (CWE-732 and descendants); or others. Closely analyze the specific mistake that is allowing the resource to be exposed, and perform a CWE mapping for that mistake. It is highly likely that CWE-668's children or descendants could apply.

Relationships and members
ChildOf: CWE-664 · View CWE-1000
Modes of introduction
Architecture and Design
Implementation

REALIZATION: This weakness is caused during implementation of an architectural security tactic.

Operation
Notes

Theoretical

A "control sphere" is a set of resources and behaviors that are accessible to a single actor, or a group of actors. A product's security model will typically define multiple spheres, possibly implicitly. For example, a server might define one sphere for "administrators" who can create new user accounts with subdirectories under /home/server/, and a second sphere might cover the set of users who can create or delete files within their own subdirectories. A third sphere might be "users who are authenticated to the operating system on which the product is installed." Each sphere has different sets of actors and allowable behaviors.

Content history
Submission: CWE Content Team · MITRE · 2008-04-11 · CWE Draft 9
Modification: Eric Dalci · Cigital · 2008-07-01 · CWE 1.0

updated Time_of_Introduction

Modification: CWE Content Team · MITRE · 2008-09-08 · CWE 1.0

updated Relationships, Other_Notes

Modification: CWE Content Team · MITRE · 2008-11-24 · CWE 1.1

updated Relationships

Modification: CWE Content Team · MITRE · 2009-05-27 · CWE 1.4

updated Relationships

Modification: CWE Content Team · MITRE · 2009-07-22 · CWE 1.5

Clarified description to include permissions.

Modification: CWE Content Team · MITRE · 2009-07-27 · CWE 1.5

updated Description, Relationships

Modification: CWE Content Team · MITRE · 2009-10-29 · CWE 1.6

updated Other_Notes, Theoretical_Notes

Modification: CWE Content Team · MITRE · 2009-12-28 · CWE 1.7

updated Relationships

Modification: CWE Content Team · MITRE · 2010-09-27 · CWE 1.10

updated Relationships

Modification: CWE Content Team · MITRE · 2011-03-29 · CWE 1.12

updated Relationships

Modification: CWE Content Team · MITRE · 2011-06-01 · CWE 1.13

updated Common_Consequences

Modification: CWE Content Team · MITRE · 2012-05-11 · CWE 2.2

updated Relationships

Modification: CWE Content Team · MITRE · 2013-02-21 · CWE 2.4

updated Relationships

Modification: CWE Content Team · MITRE · 2013-07-17 · CWE 2.5

updated Relationships

Modification: CWE Content Team · MITRE · 2014-06-23 · CWE 2.7

updated Relationships

Modification: CWE Content Team · MITRE · 2014-07-30 · CWE 2.8

updated Relationships

Modification: CWE Content Team · MITRE · 2015-12-07 · CWE 2.9

updated Relationships

Modification: CWE Content Team · MITRE · 2017-01-19 · CWE 2.10

updated Relationships

Modification: CWE Content Team · MITRE · 2017-11-08 · CWE 3.0

updated Modes_of_Introduction, Relationships, Relevant_Properties

Modification: CWE Content Team · MITRE · 2019-01-03 · CWE 3.2

updated Relationships

Modification: CWE Content Team · MITRE · 2019-06-20 · CWE 3.3

updated Relationships

Modification: CWE Content Team · MITRE · 2020-02-24 · CWE 4.0

updated Relationships

Modification: CWE Content Team · MITRE · 2020-06-25 · CWE 4.1

updated Relationships

Modification: CWE Content Team · MITRE · 2021-03-15 · CWE 4.4

updated Relationships

Modification: CWE Content Team · MITRE · 2021-10-28 · CWE 4.6

updated Relationships

Modification: CWE Content Team · MITRE · 2022-04-28 · CWE 4.7

updated Relationships

Modification: CWE Content Team · MITRE · 2022-10-13 · CWE 4.9

updated References

Modification: CWE Content Team · MITRE · 2023-04-27 · CWE 4.11

updated Relationships

Modification: CWE Content Team · MITRE · 2023-06-29 · CWE 4.12

updated Mapping_Notes

Modification: CWE Content Team · MITRE · 2025-04-03 · CWE 4.17

updated Common_Consequences, Relationships

Modification: CWE Content Team · MITRE · 2025-12-11 · CWE 4.19

updated Applicable_Platforms, Relationships, Weakness_Ordinalities

Modification: CWE Content Team · MITRE · 2026-04-30 · CWE 4.20

updated Mapping_Notes

Modification: CWE Content Team · MITRE · 2026-10-28 · CWE 5.0

updated Mapping_Notes, Relationships

1348 vulnerabilities reference this CWE, most recent first.

GHSA-XVM4-HFQ6-6R23

Vulnerability from github – Published: 2023-06-06 09:30 – Updated: 2024-04-04 04:34
VLAI
Details

Information disclosure in Linux Networking Firmware due to unauthorized information leak during side channel analysis.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2022-40525"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-200",
      "CWE-668"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2023-06-06T08:15:11Z",
    "severity": "MODERATE"
  },
  "details": "Information disclosure in Linux Networking Firmware due to unauthorized information leak during side channel analysis.",
  "id": "GHSA-xvm4-hfq6-6r23",
  "modified": "2024-04-04T04:34:16Z",
  "published": "2023-06-06T09:30:19Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-40525"
    },
    {
      "type": "WEB",
      "url": "https://www.qualcomm.com/company/product-security/bulletins/june-2023-bulletin"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-XVMP-X3RV-7475

Vulnerability from github – Published: 2022-02-10 00:00 – Updated: 2023-08-08 15:31
VLAI
Details

In Zammad 5.0.2, agents can configure "out of office" periods and substitute persons. If the substitute persons didn't have the same permissions as the original agent, they could receive ticket notifications for tickets that they have no access to.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2021-44886"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-668"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2022-02-04T15:15:00Z",
    "severity": "MODERATE"
  },
  "details": "In Zammad 5.0.2, agents can configure \"out of office\" periods and substitute persons. If the substitute persons didn\u0027t have the same permissions as the original agent, they could receive ticket notifications for tickets that they have no access to.",
  "id": "GHSA-xvmp-x3rv-7475",
  "modified": "2023-08-08T15:31:37Z",
  "published": "2022-02-10T00:00:52Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-44886"
    },
    {
      "type": "WEB",
      "url": "https://zammad.com/en/advisories/zaa-2021-21"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-XVXC-929R-6MVQ

Vulnerability from github – Published: 2022-05-24 19:11 – Updated: 2022-07-13 00:01
VLAI
Details

NetSarang Xshell 7 before Build 0077 includes unintended code strings in paste operations.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2021-37326"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-668"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2021-08-15T16:15:00Z",
    "severity": "MODERATE"
  },
  "details": "NetSarang Xshell 7 before Build 0077 includes unintended code strings in paste operations.",
  "id": "GHSA-xvxc-929r-6mvq",
  "modified": "2022-07-13T00:01:33Z",
  "published": "2022-05-24T19:11:10Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-37326"
    },
    {
      "type": "WEB",
      "url": "https://www.netsarang.com/en/xshell-update-history"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-XW4C-9434-3F7P

Vulnerability from github – Published: 2022-05-24 16:51 – Updated: 2023-10-26 16:22
VLAI
Summary
Jenkins Google Kubernetes Engine Plugin vulnerable to Exposure of Resource to Wrong Sphere
Details

Jenkins Google Kubernetes Engine Plugin 0.6.2 and earlier created a temporary file named .kube…config containing a temporary access token in the project workspace, where it could be accessed by users with Job/Read permission.

This temporary file is now created outside the regular project workspace.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Maven",
        "name": "org.jenkins-ci.plugins:google-kubernetes-engine"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.6.3"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2019-10365"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-668"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2023-03-03T23:12:53Z",
    "nvd_published_at": "2019-07-31T13:15:00Z",
    "severity": "MODERATE"
  },
  "details": "Jenkins Google Kubernetes Engine Plugin 0.6.2 and earlier created a temporary file named `.kube\u2026config` containing a temporary access token in the project workspace, where it could be accessed by users with Job/Read permission.\n\nThis temporary file is now created outside the regular project workspace.",
  "id": "GHSA-xw4c-9434-3f7p",
  "modified": "2023-10-26T16:22:00Z",
  "published": "2022-05-24T16:51:51Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2019-10365"
    },
    {
      "type": "WEB",
      "url": "https://jenkins.io/security/advisory/2019-07-31/#SECURITY-1345"
    },
    {
      "type": "WEB",
      "url": "http://www.openwall.com/lists/oss-security/2019/07/31/1"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Jenkins Google Kubernetes Engine Plugin vulnerable to Exposure of Resource to Wrong Sphere"
}

GHSA-XXH6-F3X3-2XGF

Vulnerability from github – Published: 2023-02-14 06:31 – Updated: 2023-02-21 21:30
VLAI
Details

An attacker authenticated as a non-admin user with local access to a server port assigned to the SAP Host Agent (Start Service) - versions 7.21, 7.22, can submit a crafted ConfigureOutsideDiscovery request with an operating system command which will be executed with administrator privileges. The OS command can read or modify any user or system data and can make the system unavailable.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2023-24523"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-668"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2023-02-14T04:15:00Z",
    "severity": "HIGH"
  },
  "details": "An attacker authenticated as a non-admin user with local access to a server port assigned to the SAP Host Agent (Start Service) - versions 7.21, 7.22, can submit a crafted ConfigureOutsideDiscovery request with an operating system command which will be executed with administrator privileges. The OS command can read or modify any user or system data and can make the system unavailable.",
  "id": "GHSA-xxh6-f3x3-2xgf",
  "modified": "2023-02-21T21:30:18Z",
  "published": "2023-02-14T06:31:25Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-24523"
    },
    {
      "type": "WEB",
      "url": "https://launchpad.support.sap.com/#/notes/3285757"
    },
    {
      "type": "WEB",
      "url": "https://www.sap.com/documents/2022/02/fa865ea4-167e-0010-bca6-c68f7e60039b.html"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-XXPW-32HF-Q8V9

Vulnerability from github – Published: 2026-03-05 01:22 – Updated: 2026-03-06 14:24
VLAI
Summary
AVideo: Unauthenticated PHP session store exposed to host network via published memcached port
Details

Summary

The official docker-compose.yml publishes the memcached service on host port 11211 (0.0.0.0:11211) with no authentication, while the Dockerfile configures PHP to store all user sessions in that memcached instance. An attacker who can reach port 11211 can read, modify, or flush session data — enabling session hijacking, admin impersonation, and mass session destruction without any application-level authentication.

Severity

High (CVSS 3.1: 8.1)

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

  • Attack Vector: Network — docker-compose.yml binds memcached to 0.0.0.0:11211 on the host
  • Attack Complexity: High — exploitation requires port 11211 to be network-reachable, which depends on external firewall/security group configuration beyond the attacker's control
  • Privileges Required: None — memcached has no authentication mechanism enabled
  • User Interaction: None
  • Scope: Unchanged — impact is to the AVideo application's session management
  • Confidentiality Impact: High — session data includes user IDs, admin flags, email addresses, and password hashes
  • Integrity Impact: High — an attacker can modify session data to inject admin privileges or impersonate any user
  • Availability Impact: High — flush_all destroys all active sessions, forcing mass logout

Affected Component

  • docker-compose.yml — memcached service ports directive (line 203)
  • Dockerfile — PHP session configuration (lines 150-151)

CWE

  • CWE-668: Exposure of Resource to Wrong Sphere
  • CWE-287: Improper Authentication (memcached has no authentication)

Description

Memcached port unnecessarily published to host network

The docker-compose.yml publishes the memcached port to the Docker host's network interface:

# docker-compose.yml — lines 192-213
  memcached:
    image: memcached:alpine
    restart: unless-stopped
    command: >
      memcached -m 512 -c 2048 -t ${NPROC:-4} -R 200
    ports:
      - "${MEMCACHE_PORT:-11211}:11211"    # <-- Exposes to 0.0.0.0:11211
    networks:
      - app_net

The memcached command has no authentication flags: - No -S flag (SASL authentication) - No -l 127.0.0.1 flag (interface binding restriction)

The default env.example reinforces this port:

MEMCACHE_PORT=11211

PHP sessions stored entirely in memcached

The Dockerfile configures PHP to use memcached as the session store:

; Dockerfile — lines 150-151
session.save_handler           = memcached
session.save_path              = "memcached:11211?persistent=1&timeout=2&retry_interval=5"

Session data contains all authentication state

The application stores complete authentication state in sessions. From objects/user.php:

// user.php:1521 — login check
$isLogged = !empty($_SESSION['user']['id']);

// user.php:1544 — admin check
return !empty($_SESSION['user']['isAdmin']);

Session data includes: user ID, email, username, password hash, admin flag, channel name, photo URL, and email verification status (user.php lines 329-733). All of this is readable and writable via the exposed memcached port.

Inconsistent defense: database services are correctly internal-only

The docker-compose.yml demonstrates awareness of proper service isolation — both database services have NO ports: directive:

# docker-compose.yml — database service (lines 136-163)
  database:
    build:
      context: .
      dockerfile: Dockerfile.mariadb
    # ... NO ports: directive — internal only
    networks:
      - app_net

# docker-compose.yml — database_encoder service (lines 165-189)
  database_encoder:
    build:
      context: .
      dockerfile: Dockerfile.mariadb
    # ... NO ports: directive — internal only
    networks:
      - app_net

Both databases are only reachable via the internal app_net Docker network. Memcached — which stores equally sensitive session data — should follow the same pattern but does not. This inconsistency confirms the exposure is an oversight, not a design choice.

Port exposure map

Service Ports published to host Contains sensitive data Exposure justified
avideo 80, 443, 2053 N/A (web server) Yes — serves web traffic
live 1935, 8080, 8443 N/A (streaming) Yes — serves RTMP/HLS
database None Yes (all app data) Correct — internal only
database_encoder None Yes (encoder data) Correct — internal only
memcached 11211 Yes (all sessions) No — should be internal only

Execution chain

  1. Attacker scans the target host and discovers port 11211 is open
  2. Attacker connects with nc TARGET 11211 or any memcached client — no authentication required
  3. Attacker runs stats items to enumerate session slab classes
  4. Attacker runs stats cachedump <slab_id> <limit> to list session keys
  5. Attacker runs get <session_key> to read serialized PHP session data containing user IDs, admin flags, and password hashes
  6. Attacker either:
  7. Hijacks a session: uses the session ID as a cookie to impersonate the user
  8. Escalates privileges: modifies session data to set isAdmin to true via set <session_key>
  9. Performs DoS: runs flush_all to destroy all sessions

Proof of Concept

# 1. Verify memcached is reachable (returns server stats)
echo -e "stats\r" | nc TARGET 11211

# 2. Enumerate session keys
echo -e "stats items\r" | nc TARGET 11211
# Then for each slab:
echo -e "stats cachedump 1 100\r" | nc TARGET 11211

# 3. Read a session (key format: memc.sess.key.<session_id>)
echo -e "get memc.sess.key.abc123sessionid\r" | nc TARGET 11211
# Returns serialized PHP session with user data, admin flag, etc.

# 4. DoS — destroy all sessions (logs out every user)
echo -e "flush_all\r" | nc TARGET 11211

For session hijacking, extract the session ID from step 3 and set it as the PHPSESSID cookie in a browser to impersonate the victim user.

Impact

  • Session hijacking: Read any user's session data and impersonate them by reusing their session ID — including admin accounts
  • Privilege escalation: Modify session data to set $_SESSION['user']['isAdmin'] to a truthy value, granting admin access to any session
  • Credential exposure: Session data includes password hashes ($_SESSION['user']['passhash'], user.php:555) that can be cracked offline
  • Mass session destruction: flush_all destroys all active sessions, forcing every logged-in user to re-authenticate — a one-command denial of service
  • Reconnaissance: stats reveals server uptime, memory usage, connection counts, and cache hit/miss ratios

Recommended Remediation

Option 1: Remove the port mapping (preferred — one-line fix)

Memcached is only used internally by the PHP application via Docker networking. Remove the ports: directive entirely:

# docker-compose.yml — memcached service
  memcached:
    image: memcached:alpine
    restart: unless-stopped
    command: >
      memcached -m 512 -c 2048 -t ${NPROC:-4} -R 200
    # REMOVED: ports:
    #   - "${MEMCACHE_PORT:-11211}:11211"
    deploy:
      resources:
        limits:
          cpus: '1'
          memory: "4G"
        reservations:
          cpus: '0.5'
          memory: '1G'
    networks:
      - app_net

Also remove MEMCACHE_PORT=11211 from env.example since the port is no longer published.

The PHP application connects via the Docker internal hostname memcached:11211 (from session.save_path), which uses the app_net bridge network and does not require host-level port mapping.

Option 2: Bind memcached to localhost only (if host access is needed for debugging)

If host-level access to memcached is needed for debugging, bind only to the loopback interface:

    ports:
      - "127.0.0.1:${MEMCACHE_PORT:-11211}:11211"

This prevents remote access while allowing localhost:11211 connections from the Docker host.

Option 3: Enable SASL authentication (defense-in-depth)

Add SASL authentication to memcached as an additional layer:

    command: >
      memcached -m 512 -c 2048 -t ${NPROC:-4} -R 200 -S
    environment:
      MEMCACHED_USERNAME: "${MEMCACHED_USER:-avideo}"
      MEMCACHED_PASSWORD: "${MEMCACHED_PASSWORD}"

Update the PHP session configuration accordingly:

session.save_path = "PERSISTENT=myapp avideo:${MEMCACHED_PASSWORD}@memcached:11211"

Note: Option 1 alone is sufficient and should be applied immediately. Options 2 and 3 provide defense-in-depth.

Credit

This vulnerability was discovered and reported by bugbunny.ai.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Packagist",
        "name": "wwbn/avideo"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "last_affected": "21.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-29093"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-287",
      "CWE-668"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-03-05T01:22:21Z",
    "nvd_published_at": "2026-03-06T04:16:08Z",
    "severity": "HIGH"
  },
  "details": "## Summary\nThe official `docker-compose.yml` publishes the memcached service on host port 11211 (`0.0.0.0:11211`) with no authentication, while the Dockerfile configures PHP to store all user sessions in that memcached instance. An attacker who can reach port 11211 can read, modify, or flush session data \u2014 enabling session hijacking, admin impersonation, and mass session destruction without any application-level authentication.\n\n## Severity\n**High** (CVSS 3.1: 8.1)\n\n`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`\n\n- **Attack Vector:** Network \u2014 `docker-compose.yml` binds memcached to `0.0.0.0:11211` on the host\n- **Attack Complexity:** High \u2014 exploitation requires port 11211 to be network-reachable, which depends on external firewall/security group configuration beyond the attacker\u0027s control\n- **Privileges Required:** None \u2014 memcached has no authentication mechanism enabled\n- **User Interaction:** None\n- **Scope:** Unchanged \u2014 impact is to the AVideo application\u0027s session management\n- **Confidentiality Impact:** High \u2014 session data includes user IDs, admin flags, email addresses, and password hashes\n- **Integrity Impact:** High \u2014 an attacker can modify session data to inject admin privileges or impersonate any user\n- **Availability Impact:** High \u2014 `flush_all` destroys all active sessions, forcing mass logout\n\n## Affected Component\n- `docker-compose.yml` \u2014 memcached service `ports` directive (line 203)\n- `Dockerfile` \u2014 PHP session configuration (lines 150-151)\n\n## CWE\n- **CWE-668**: Exposure of Resource to Wrong Sphere\n- **CWE-287**: Improper Authentication (memcached has no authentication)\n\n## Description\n\n### Memcached port unnecessarily published to host network\n\nThe `docker-compose.yml` publishes the memcached port to the Docker host\u0027s network interface:\n\n```yaml\n# docker-compose.yml \u2014 lines 192-213\n  memcached:\n    image: memcached:alpine\n    restart: unless-stopped\n    command: \u003e\n      memcached -m 512 -c 2048 -t ${NPROC:-4} -R 200\n    ports:\n      - \"${MEMCACHE_PORT:-11211}:11211\"    # \u003c-- Exposes to 0.0.0.0:11211\n    networks:\n      - app_net\n```\n\nThe memcached command has no authentication flags:\n- No `-S` flag (SASL authentication)\n- No `-l 127.0.0.1` flag (interface binding restriction)\n\nThe default `env.example` reinforces this port:\n```\nMEMCACHE_PORT=11211\n```\n\n### PHP sessions stored entirely in memcached\n\nThe Dockerfile configures PHP to use memcached as the session store:\n\n```ini\n; Dockerfile \u2014 lines 150-151\nsession.save_handler           = memcached\nsession.save_path              = \"memcached:11211?persistent=1\u0026timeout=2\u0026retry_interval=5\"\n```\n\n### Session data contains all authentication state\n\nThe application stores complete authentication state in sessions. From `objects/user.php`:\n\n```php\n// user.php:1521 \u2014 login check\n$isLogged = !empty($_SESSION[\u0027user\u0027][\u0027id\u0027]);\n\n// user.php:1544 \u2014 admin check\nreturn !empty($_SESSION[\u0027user\u0027][\u0027isAdmin\u0027]);\n```\n\nSession data includes: user ID, email, username, password hash, admin flag, channel name, photo URL, and email verification status (user.php lines 329-733). All of this is readable and writable via the exposed memcached port.\n\n### Inconsistent defense: database services are correctly internal-only\n\nThe `docker-compose.yml` demonstrates awareness of proper service isolation \u2014 both database services have NO `ports:` directive:\n\n```yaml\n# docker-compose.yml \u2014 database service (lines 136-163)\n  database:\n    build:\n      context: .\n      dockerfile: Dockerfile.mariadb\n    # ... NO ports: directive \u2014 internal only\n    networks:\n      - app_net\n\n# docker-compose.yml \u2014 database_encoder service (lines 165-189)\n  database_encoder:\n    build:\n      context: .\n      dockerfile: Dockerfile.mariadb\n    # ... NO ports: directive \u2014 internal only\n    networks:\n      - app_net\n```\n\nBoth databases are only reachable via the internal `app_net` Docker network. Memcached \u2014 which stores equally sensitive session data \u2014 should follow the same pattern but does not. This inconsistency confirms the exposure is an oversight, not a design choice.\n\n### Port exposure map\n\n| Service | Ports published to host | Contains sensitive data | Exposure justified |\n|---------|------------------------|------------------------|--------------------|\n| avideo | 80, 443, 2053 | N/A (web server) | Yes \u2014 serves web traffic |\n| live | 1935, 8080, 8443 | N/A (streaming) | Yes \u2014 serves RTMP/HLS |\n| database | None | Yes (all app data) | Correct \u2014 internal only |\n| database_encoder | None | Yes (encoder data) | Correct \u2014 internal only |\n| **memcached** | **11211** | **Yes (all sessions)** | **No \u2014 should be internal only** |\n\n### Execution chain\n\n1. Attacker scans the target host and discovers port 11211 is open\n2. Attacker connects with `nc TARGET 11211` or any memcached client \u2014 no authentication required\n3. Attacker runs `stats items` to enumerate session slab classes\n4. Attacker runs `stats cachedump \u003cslab_id\u003e \u003climit\u003e` to list session keys\n5. Attacker runs `get \u003csession_key\u003e` to read serialized PHP session data containing user IDs, admin flags, and password hashes\n6. Attacker either:\n   - **Hijacks a session**: uses the session ID as a cookie to impersonate the user\n   - **Escalates privileges**: modifies session data to set `isAdmin` to true via `set \u003csession_key\u003e`\n   - **Performs DoS**: runs `flush_all` to destroy all sessions\n\n## Proof of Concept\n\n```bash\n# 1. Verify memcached is reachable (returns server stats)\necho -e \"stats\\r\" | nc TARGET 11211\n\n# 2. Enumerate session keys\necho -e \"stats items\\r\" | nc TARGET 11211\n# Then for each slab:\necho -e \"stats cachedump 1 100\\r\" | nc TARGET 11211\n\n# 3. Read a session (key format: memc.sess.key.\u003csession_id\u003e)\necho -e \"get memc.sess.key.abc123sessionid\\r\" | nc TARGET 11211\n# Returns serialized PHP session with user data, admin flag, etc.\n\n# 4. DoS \u2014 destroy all sessions (logs out every user)\necho -e \"flush_all\\r\" | nc TARGET 11211\n```\n\nFor session hijacking, extract the session ID from step 3 and set it as the `PHPSESSID` cookie in a browser to impersonate the victim user.\n\n## Impact\n\n- **Session hijacking**: Read any user\u0027s session data and impersonate them by reusing their session ID \u2014 including admin accounts\n- **Privilege escalation**: Modify session data to set `$_SESSION[\u0027user\u0027][\u0027isAdmin\u0027]` to a truthy value, granting admin access to any session\n- **Credential exposure**: Session data includes password hashes (`$_SESSION[\u0027user\u0027][\u0027passhash\u0027]`, user.php:555) that can be cracked offline\n- **Mass session destruction**: `flush_all` destroys all active sessions, forcing every logged-in user to re-authenticate \u2014 a one-command denial of service\n- **Reconnaissance**: `stats` reveals server uptime, memory usage, connection counts, and cache hit/miss ratios\n\n## Recommended Remediation\n\n### Option 1: Remove the port mapping (preferred \u2014 one-line fix)\n\nMemcached is only used internally by the PHP application via Docker networking. Remove the `ports:` directive entirely:\n\n```yaml\n# docker-compose.yml \u2014 memcached service\n  memcached:\n    image: memcached:alpine\n    restart: unless-stopped\n    command: \u003e\n      memcached -m 512 -c 2048 -t ${NPROC:-4} -R 200\n    # REMOVED: ports:\n    #   - \"${MEMCACHE_PORT:-11211}:11211\"\n    deploy:\n      resources:\n        limits:\n          cpus: \u00271\u0027\n          memory: \"4G\"\n        reservations:\n          cpus: \u00270.5\u0027\n          memory: \u00271G\u0027\n    networks:\n      - app_net\n```\n\nAlso remove `MEMCACHE_PORT=11211` from `env.example` since the port is no longer published.\n\nThe PHP application connects via the Docker internal hostname `memcached:11211` (from `session.save_path`), which uses the `app_net` bridge network and does not require host-level port mapping.\n\n### Option 2: Bind memcached to localhost only (if host access is needed for debugging)\n\nIf host-level access to memcached is needed for debugging, bind only to the loopback interface:\n\n```yaml\n    ports:\n      - \"127.0.0.1:${MEMCACHE_PORT:-11211}:11211\"\n```\n\nThis prevents remote access while allowing `localhost:11211` connections from the Docker host.\n\n### Option 3: Enable SASL authentication (defense-in-depth)\n\nAdd SASL authentication to memcached as an additional layer:\n\n```yaml\n    command: \u003e\n      memcached -m 512 -c 2048 -t ${NPROC:-4} -R 200 -S\n    environment:\n      MEMCACHED_USERNAME: \"${MEMCACHED_USER:-avideo}\"\n      MEMCACHED_PASSWORD: \"${MEMCACHED_PASSWORD}\"\n```\n\nUpdate the PHP session configuration accordingly:\n```ini\nsession.save_path = \"PERSISTENT=myapp avideo:${MEMCACHED_PASSWORD}@memcached:11211\"\n```\n\n**Note:** Option 1 alone is sufficient and should be applied immediately. Options 2 and 3 provide defense-in-depth.\n\n## Credit\nThis vulnerability was discovered and reported by [bugbunny.ai](https://bugbunny.ai).",
  "id": "GHSA-xxpw-32hf-q8v9",
  "modified": "2026-03-06T14:24:08Z",
  "published": "2026-03-05T01:22:21Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/WWBN/AVideo/security/advisories/GHSA-xxpw-32hf-q8v9"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-29093"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/WWBN/AVideo"
    },
    {
      "type": "WEB",
      "url": "https://github.com/WWBN/AVideo/releases/tag/24.0"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "AVideo: Unauthenticated PHP session store exposed to host network via published memcached port"
}

GHSA-XXWR-V6HC-32HM

Vulnerability from github – Published: 2023-08-16 18:30 – Updated: 2023-11-03 21:30
VLAI
Details

Dell Storage Integration Tools for VMware (DSITV) 06.01.00.016 contain an information disclosure vulnerability. A local low-privileged malicious user could potentially exploit this vulnerability to retrieve an encryption key that could aid in further attacks.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2023-39250"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-540",
      "CWE-668"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2023-08-16T16:15:11Z",
    "severity": "MODERATE"
  },
  "details": "\nDell Storage Integration Tools for VMware (DSITV) 06.01.00.016 contain an information disclosure vulnerability. A local low-privileged malicious user could potentially exploit this vulnerability to retrieve an encryption key that could aid in further attacks.\n\n",
  "id": "GHSA-xxwr-v6hc-32hm",
  "modified": "2023-11-03T21:30:19Z",
  "published": "2023-08-16T18:30:23Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-39250"
    },
    {
      "type": "WEB",
      "url": "https://www.dell.com/support/kbdoc/en-us/000216615/dsa-2023-282-security-update-for-dell-storage-integration-tools-for-vmware-dsitv-vulnerabilities"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-XXXV-FFHQ-JC78

Vulnerability from github – Published: 2023-09-22 06:30 – Updated: 2024-03-21 03:35
VLAI
Details

** DISPUTED ** Plesk Onyx 17.8.11 has accessKeyId and secretAccessKey fields that are related to an Amazon AWS Firehose component. NOTE: the vendor's position is that there is no security threat.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2023-43784"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-668"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2023-09-22T06:15:10Z",
    "severity": "HIGH"
  },
  "details": "** DISPUTED ** Plesk Onyx 17.8.11 has accessKeyId and secretAccessKey fields that are related to an Amazon AWS Firehose component. NOTE: the vendor\u0027s position is that there is no security threat.",
  "id": "GHSA-xxxv-ffhq-jc78",
  "modified": "2024-03-21T03:35:47Z",
  "published": "2023-09-22T06:30:19Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-43784"
    },
    {
      "type": "WEB",
      "url": "https://docs.aws.amazon.com/IAM/latest/UserGuide/security-creds.html"
    },
    {
      "type": "WEB",
      "url": "https://talk.plesk.com/threads/why-in-plesk-firehouse-aws-keys-are-public.369925"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
      "type": "CVSS_V3"
    }
  ]
}

No mitigation information available for this CWE.

No CAPEC attack patterns related to this CWE.