sruupl / batflat

Lightweight, fast and easy CMS for free. Bootstrap ready. https://batflat.org
MIT License
134 stars 54 forks source link

Arbitrary code execution on the backend #123

Open Airrudder opened 2 years ago

Airrudder commented 2 years ago

Hello, I think this is a more serious vulnerability. As long as any one has the permission to edit Blog or Pages pages, of course, other interfaces also have similar problems. The problem mainly occurs in the inc/core/lib/Templates.php, which is also some template format used in your footer and title

image-20211223212734357

Below I will give the way to use it: 1、 Blog:

{? system('whoami')?}
{?=system('id')?}
image-20211223213504644 image-20211223213552957

Preview it, use success:

image-20211223213653658

2、Pages: Here I give another payload use:

{if: system('id')}{/if}
image-20211223213911442

Preview it, use success:

image-20211223213932587