Skip to content
Heist/ feed
Back to feed
High

BoidCMS: Local File Inclusion (LFI) leads to Remote Code Execution (RCE) via tpl parameter

Type: advisorySources: OSV

BoidCMS is an open-source, PHP-based flat-file CMS for building simple websites and blogs, using JSON as its database. Versions prior to 2.1.3 are vulnerable to a critical Local File Inclusion (LFI) attack via the tpl parameter, which can lead to Remote Code Execution (RCE).The application fails to sanitize the tpl (template) parameter during page creation and updates. This parameter is passed directly to a require_once() statement without path validation. An authenticated administrator can exploit this by injecting path traversal sequences (../) into the tpl value to escape the intended theme directory and include arbitrary files — specifically, files from the server's media/ directory. When combined with the file upload functionality, this becomes a full RCE chain: an attacker can first upload a file with embedded PHP code (e.g., disguised as image data), then use the path traversal vulnerability to include that file via require_once(), executing the embedded code with web server privileges. This issue has been fixed in version 2.1.3.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-39387
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 11:04 UTC · Revision 1

Source evidence

BoidCMS: Local File Inclusion (LFI) leads to Remote Code Execution (RCE) via tpl parameter

core-osv · Original source

Published 14 Apr 2026, 22:56 UTC

BoidCMS is an open-source, PHP-based flat-file CMS for building simple websites and blogs, using JSON as its database. Versions prior to 2.1.3 are vulnerable to a critical Local File Inclusion (LFI) attack via the tpl parameter, which can lead to Remote Code Execution (RCE).The application fails to sanitize the tpl (template) parameter during page creation and updates. This parameter is passed directly to a require_once() statement without path validation. An authenticated administrator can exploit this by injecting path traversal sequences (../) into the tpl value to escape the intended theme directory and include arbitrary files — specifically, files from the server's media/ directory. When combined with the file upload functionality, this becomes a full RCE chain: an attacker can first upload a file with embedded PHP code (e.g., disguised as image data), then use the path traversal vulnerability to include that file via require_once(), executing the embedded code with web server privileges. This issue has been fixed in version 2.1.3.

osv:CVE-2026-39387
Complete source record
{
  "id": "ce077d2e72cd1c1660f089c7e1bd3f5142b8d288cd1245b82f48533d8bc0a8b5",
  "url": "https://osv.dev/vulnerability/CVE-2026-39387",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "BoidCMS: Local File Inclusion (LFI) leads to Remote Code Execution (RCE) via tpl parameter",
    "summary": "BoidCMS is an open-source, PHP-based flat-file CMS for building simple websites and blogs, using JSON as its database. Versions prior to 2.1.3 are vulnerable to a critical Local File Inclusion (LFI) attack via the tpl parameter, which can lead to Remote Code Execution (RCE).The application fails to sanitize the tpl (template) parameter during page creation and updates. This parameter is passed directly to a require_once() statement without path validation. An authenticated administrator can exploit this by injecting path traversal sequences (../) into the tpl value to escape the intended theme directory and include arbitrary files — specifically, files from the server's media/ directory. When combined with the file upload functionality, this becomes a full RCE chain: an attacker can first upload a file with embedded PHP code (e.g., disguised as image data), then use the path traversal vulnerability to include that file via require_once(), executing the embedded code with web server privileges. This issue has been fixed in version 2.1.3.",
    "evidence": "osv:CVE-2026-39387",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-39387",
      "aliases": [
        "CVE-2026-39387",
        "GHSA-45xp-xw54-6cv6"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/boidcms/boidcms",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "0c09e022e674b2ef91b1dec734bc2a3076c2a131"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.1.3"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "0c09e022e674b2ef91b1dec734bc2a3076c2a131"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v2.1.3"
                  },
                  {
                    "cpe": "cpe:2.3:a:boidcms:boidcms:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.1.3"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v2.1.2",
            "v2.1.1",
            "v2.1.0",
            "v2.0.1",
            "v2.0.0",
            "v1.0.1",
            "v1.0.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-39387.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:34.628595551Z",
      "provider": "osv",
      "references": [
        "https://github.com/BoidCMS/BoidCMS/releases/tag/v2.1.3",
        "https://github.com/BoidCMS/BoidCMS/security/advisories/GHSA-45xp-xw54-6cv6",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/39xxx/CVE-2026-39387.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-39387"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-98"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/39xxx/CVE-2026-39387.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-39387",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 501926,
  "published_at": "2026-04-14T22:56:20.935+00:00"
}