Giter Club home page Giter Club logo

wondercms's Introduction

WonderCMS logo
WonderCMS - small flat file CMS
5 files • 48KB zip - 1 step install

Docs Project Maintained License Number of downloads since first release on GitHub Donate

WonderCMS is an extremely small flat file CMS. It's fast, responsive and doesn't require any configuration.

It provides a simple way for creating and editing websites.
Includes features such as: 1-step install, 1-click updates, 1-click backups, theme/plugin installer and much more.

What is WonderCMS? Introduction

Small and simple flat file CMS

  • No configuration needed - unzip and upload.
  • 5 files: database.js (JSON format), index.php, theme.php, style.css and htaccess.
    • Transferring your website to a new host/server is done by only copy/pasting all files (no additional configuration/migration)
  • Privacy oriented: no cookies, tracking or "powered by" links.
  • Includes plugins (via hooks/listeners), themes/plugins installer, backups, 1 click updates.
  • Supports most server types (Apache, NGINX, IIS, Caddy).
  • Project goal: keep it simple, tiny, hassle free (infrequent-ish 1 click updates).

1 step install


Other install options


Requirements

  • PHP 7.4 or greater
    • cURL extension
    • mbstring extension
    • Zip extension
  • mod_rewrite module
  • any type of server (Apache, NGINX, IIS, Caddy)

For setting up WonderCMS on NGINX or IIS servers, there is one additional step required. Read more: NGINX setup or IIS setup.

WonderCMS works on most Apache servers/hosts (even free ones) by default.


Libraries used (3)

  • 3 libraries located in index.php, included only when admin is logged in:
    • wcms-admin.min.js, autosize.min.js (4.0.2), taboverride.min.js (4.0.3).

Note: Some plugins also include other libraries such as jQuery, default WonderCMS out-of-the box includes only the above libraries through CDNs.


Security features

  • Track free and transparent - WonderCMS doesn't track users or store any personal cookies, there is only one session state cookie.
  • Your WonderCMS installation is completely detached from WonderCMS servers. One click updates are pushed through GitHub.
  • Supports HTTPS out of the box.
  • All CSS and JS libraries include SubResource Integrity (SRI) tags. This prevents any changes to the libraries being loaded. If any changes are made, the libraries won't load for your and your visitors protection.
  • WonderCMS encourages you to change your default login URL. Consider your custom login URL as your private username.
    • Choosing a good login URL can prevent brute force attacks.
    • Your login page will always return a 404 header response. Search engines do not (and should not) cache your login URL.
  • The admin password is hashed using PHP's password_hash and password_verify.
    • Choosing a strong password will prevent malicious actors from gaining any further admin access (if they would have guessed your login URL).
  • WonderCMS includes CSRF verification tokens for each user action and additionally uses the hash_equals function to prevent CSRF token timing attacks.
  • No known vulnerabilities.
    • Special thanks to yassineaddi, hypnito and other security researchers.

Other features

  • no configuration required, unzip and upload
  • extremely fast
  • subpages
  • simple inline click and edit functionality
  • theme and plugin installer/updater
  • 1 click updates
  • 1 click backups
  • easy to theme
  • custom editable blocks
  • custom theme and plugin repositories
  • log of last 5 logged in IPs
  • file uploader
  • lightweight
  • responsive
  • clean URLs
  • custom homepage
  • menu reordering and visibility
    • note: hiding a page from the menu only hides it from the actual menu (and not from search engines)
  • highlighted current page in menu
  • custom 404 page
  • basic SEO support
    • custom title, keywords and description for each page
  • [optional] functions.php file for loading your custom code
    • note 1: functions.php file includes itself when you create it
    • note 2: the location of functions.php file should be inside the current active theme folder (same location as theme.php)

List of donors

Also listed on the official WonderCMS website. Thank you for supporting WonderCMS!

  • Håkon Wium Lie (also the creator of CSS)
  • Tjaša Jelačič (BigSheep)
  • Otis Schmakel
  • Mohamad Hegazy
  • Ulf Bro
  • Kim Fajdiga
  • John Greene
  • Sara Stojanovski
  • Peter Černuta
  • Jasmina Fabiani
  • Primož Cankar
  • Andraž Zvonar
  • Martin Jablonka
  • Martin King
  • Ben Gilbey
  • Darley Wilson
  • Josef Kmínek
  • Mikula Beutl
  • David Bojanovič
  • Kenneth Rasmussen
  • Victor Onofrei
  • Matthev
  • Veselin Kamenarov
  • James Campbell
  • Kirsten Hogan
  • Denis Volin
  • Jonathan Jacks
  • Bizibul
  • Bikespain
  • Aleksandr
  • Impavid Pty Ltd
  • Mohamad Hegazy
  • Happy Monsters Studios
  • Derek (Random Fandom Media Group)
  • Paweł Krużel
  • Netroid
  • Fabian Winder
  • Václav Piták

What to (or not to) expect from WonderCMS

  • WonderCMS is meant to be a small gift to the internet and a simple alternative to website creating. It's 100% free and doesn't not include any "powered by" links.
  • WonderCMS doesn't track users and is not interested in any user data.
  • WonderCMS is not a fast-pace development project. Unless there is a critical vulnerability, updates will not be rushed.
  • WonderCMS is meant to be extremely simple and will not be over-bloated with features.
    • Specific features are added only if the majority of the WonderCMS community signals a wanted change.
    • Pull requests are welcome and appreciated.
  • To make WonderCMS sustainable and compact, a maximum number of 20 plugins and 50 themes will be supported.
    • Once this limit is reached in each category, a simple voting system will be established. Users will be free to vote for their favorite plugins and themes to ensure they stay in the top 20 and top 50 pool. Votes will be held on a 6-month basis/twice per year (subject to change).
    • The voting system comes in handy when users feel one of the top plugins or themes can be replaced by better ones with similar functionality or when a plugin/theme is no longer actively maintained.
    • This is a good way to ensure a small but good quality set of themes/plugins. The "top 10 and top 25" of each category will be easier to maintain and watch over by the whole community.
  • WonderCMS doesn't include an "auto-update" feature.
    • In the unlikely event of this GitHub account being compromised, malicious actors would be able to deploy updates to all sites.
    • These type of malicious attacks are currently prevented with the built in one click updater. This minimizes possible damage as users are encouraged to review code before using the 1 click update, so no damage is done automatically.
    • There is a possibility of an auto-update if/when WonderCMS establishes its own hosting platform.
  • If you run into any issues when using WonderCMS, you can always expect someone to try to help you in the WonderCMS community.
    • Since WonderCMS is completely free and no one is paid to provide support, it's important to remain patient and respectful while asking for help.

Links

Website

Community

Social

Github

Hosting and install tutorial

wondercms's People

Contributors

alamantus avatar anolis avatar dennis-fernuni avatar gakowalski avatar hypnito avatar luizbills avatar robiso avatar slavenstancic avatar xss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wondercms's Issues

List of all requests / Roadmap

  • Old development thread can be found here: #21

User requests

- All done!

In progress or inactive

- [Plugin request] [1.0.0 released - additional requests made] Social networks block (development discussion: #42)

Short guidelines for tackling any of the requests

  1. The solution to the possible improvements should be compact/small/smart and clean in terms of code.
  2. Awesome solutions are rewarded with a honourable mention on the official WonderCMS website - https://wondercms.com/special-contributors and the WonderCMS download page https://wondercms.com/latest.
  • If our donation fund isn't empty, we'll gladly reward you with a donation as a token of appreciation.

Finished improvements from previous roadmaps/requests

1. Clean(er) URL's (short problem description: spaces and special characters URL handling + saving to database and displaying them in menu)
Long problem description and example:
When an user enters "my new page" in their menu at their example.com domain, spaces aren't stripped and the URL is example.com/my new page. The solution would be to replace spaces with the "-" character so the URL would be example.com/my-new-page.
1a. But what about all other special characters? And what "URL" are we going to save in the database in those cases.
1b. Once we update WonderCMS with this feature, how do we handle the user page names in their database.js to avoid an upgrading mess?
1c. After all this, we still need to display pages in the menu exactly the user entered them.
EDIT: this looks promising: http://cubiq.org/the-perfect-php-clean-url-generator
**IN WORK: @wdj-ac has started working on this, contribute if you can: https://github.com/wdj-ac/wondercms/issues/
- DONE, thanks to @wdj-ac (Pascal Jordin)

2. Display all pages in the settings panel and additionally include some "hide from menu" functionality.
Problem: There's currently no "full list" of pages in the settings. A solution to this would be to view the database.js but that's definitely a hassle. We need a simple way to display all pages and a checkbox in the current page settings menu, that would enabe the user to hide the page from the menu.
**IN WORK: @wdj-ac has started working on this, contribute if you can: https://github.com/wdj-ac/wondercms/issues/
- DONE, thanks to @wdj-ac (Pascal Jordin)

3. Enable users to install plugins via the settings panel. (Almost done, test version in near the end)
3a. This should be an input text field, which would take a ZIP link (allowed only from github.com domain) and extract it to the users plugin folder.
3b. Enable users to update their plugin with a new ZIP link (if the plugin name is the same).
3c. Simple plugin list (list all plugins from plugins folder)
3d. Enable users to easily remove a plugin (from the plugin list, a small "X" would do and a confirm dialog).
3e. Same functionality for themes (we will probably need an extra field for this, possibly a check box to choose between installing a plugin or a theme to avoid two text fields).

[Plugin request] Simple blog functionality (development discussion: #44) - provided with a plugin with upcoming 3.0.0 release

[Theme discussion] Blog theme (development discussion: #55) - provided with a plugin with upcoming 3.0.0 release

Add special section on WonderCMS website for plugins and themes

Automate the process of reading themes/plugins from GitHub and display them on the WonderCMS website in a searchable and paginated way (numbered pages) possibly searchable by name). - will be partially provided with upcoming 3.0.0 release

8. Additional code review/optimisation.

[Plugin request] Multi language settings panel (development discussion: #40)

Correct Cross Site Scripting [FIXED/CLOSED]

The file editinplace.php do not sanitize all the request and it is possible to execute a Cross-Site Scripting XSS attacks.

/wonder/js/editinplace.php?page=<script>alert(1)</script>

In the code, line 39, echo $_GET["page"];

https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet

When you fix the bug, please, can you include my name in the release notes when the bug will be corrected? Manuel Garcia Cardenas [email protected]

Regards,

[SELF-XSS] Stored XSS in wondercms

Hello Team,

i found a vulnerability (stored cross site scripting) and already sent email to [email protected], this vulnerability is confirmed in last version of wondercms. and work with all modern browser. hope you can fix it asap.

Best Regards,

[Plugin request] Different Theme for each page

Right now, the system limits us in having the same layout on every page we create, and that kinda defeats the purpose of having the ability to add multiple pages, as these will all look the same.

It would be great if we could assign a different theme to each page.

For example, a developer could create a theme for the Homepage, and different themes for the other pages.
By default, each page would be created using the the main layout, which can be changed in the settings.
theme

Separate Site & Config files

You cant name your sites "menu", "description", etc. because the files are in the same location as the config files...

[Plugin request] Multi-language

Hello,
I wanted to know whether it would be possible to implement a language switcher for the admin interface.
A possible solution would be using i18njs. The work needed to realize this should not be that big because wCMS already relies on JSON database.
I'd love to hear your opinion.

Persistant update notification | Summernote button size

Hello,
I found several issues which I could not resolve.

The first issue is the notification which says "New WonderCMS update available." When I click on "Update WonderCMS" the success message shoows up but the notification itself won't disappear.

The second one has to deal with the summernote plugin. The buttons of the editor don't have the same height. In the developer console I could not find any css class which overrides the default values for the buttons.

Hopefully someone can help me :)

Regards
AndiLeni

[fixed ONLY in demo because this is wanted behaviour] XSS vulnerability in the settings page

Exploit Title: Stored XSS vulnerability possible in settings page in WonderCMS (v2.0.3)
Date: 23-April-2017
Exploit Author: @C0deBr8kr
Software Link: https://www.wondercms.com/latest
Version: 2.0.3

Description:
XSS allows an attacker to run arbitrary scripts on the users browser.

Exploit POC:
Browser used: Chrome version 57.0.2987.133

  1. Login as the admin user.
  2. Go to the settings page.
  3. Enter <script>alert('XSS in the Page Title');</script> in the "Page title" field.
  4. Save the settings.
  5. The script will get executed whenever the user navigates to the page containing the script (in this case - Home page).
  6. Other fields like Page description, Main website title, Menu, Footer, Default Home page are all vulnerable to the same vulnerability of stored XSS.

References:
https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)

Screenshots:

screen shot 2017-04-23 at 1 05 57 am

  1. Entering script into page title

screen shot 2017-04-23 at 1 14 11 am

  1. Script executes on navigating to the Home page.

Impact: An attacker can execute arbitrary script on an unsuspecting user's browser.

Mitigation: Input should be properly validated before storing in the database and output from the database should also be properly encoded before displaying it to the user.

WonderCMS 2.3.1 warnings on clean install

I've just done a first time install of 2.3.1 and get the following notices:

Notice: Undefined index: token in C:\xampp\htdocs\sde\index.php on line 407

Notice: Undefined index: token in C:\xampp\htdocs\sde\index.php on line 364

[SELF-XSS] (Stored)

Affected software: WonderCMS-2.5.2

Type of vulnerability: XSS (Stored)

URL: : https://www.wondercms.com

Discovered by: Breachlock

Website: https://www.breachlock.com

Author: Balvinder Singh

Description: Stored attacks are those where the injected script is permanently stored on the target servers, such as in a database, in a message forum, visitor log, comment field, etc. The victim then retrieves the malicious script from the server when it requests the stored information. Stored XSS is also sometimes referred to as Persistent or Type-I XSS.

Proof of concept:

Step1: Login to the wonder cms.
Step2: URL: http://localhost/WonderCMS-2.5.2/wondercms/
Visit the URL and make a new page title with the description using the malicious javascript.

xss_parameterjpg

Step3: Here as the xss got executed for new page title parameter.
xss_executed_wonder

[Plugin request] markdown instead of html

Is there any posibility to use markdown instead of HTML?

I just tried WONDERcms which is supercalifragilisticexpialidocious - super easy - in usage.

But the usage of markdown would be a less better. Any chance to get this?

Show Contact Form only on one Page - how does it work?

Hi Developers,

How can I display the contact form on a single page? I can paste the PHP code into theme.php, but the form will be displayed on all content pages.

For the contact I have a page "contact" and only there should the form be displayed.

How can I relay it?

Thanks in Advance.

[Self-attack vulnerabilities] possibilities/list

The bugs below work only if an admin is logged and is tricked into pasting JavaScript code or uploading SVG's

WonderCMS comes with some security features and some responsibilities.

1. A logged-in user (admin) can execute JavaScript anywhere on their website.

  • This has always been a WonderCMS feature.
  • I personally don't consider this needs fixing, since a logged-in admin can do much more damage than just XSS attacks (including website defacement, malware distribution, cryptominers, ...)

2. A logged in user can upload a SVG (containing code other than an image, such as JavaScript).

  • SVG's are generally not just images, they can also include code such as JavaScript, XML, these are awesome features of SVG's.
  • Sanitizing SVG's would partially kill their functionality.
  • If there are enough wishes for this action, the SVG uploading functionality can be completely removed from WonderCMS.
  • If we already allow JavaScript to be executed at any part of the CMS, would removing the SVG functionality make any difference?

3. Host header attack.

  • This will not be considered a vulnerability until we see a live exploit of this (not local).
  • Using the Burp Suite Tool to create/show a local attack is not enough, since there needs to be a way to exploit a WonderCMS installation (and not just locally attack one-self).

How to prevent self-attack vulnerabilities

  • Avoid pasting random JavaScript code.
  • Avoid uploading random SVG's.
    - Install themes and plugins only from wondercms.com

The list above is subject to change. All discussions are welcome.
Reporting the above issues/bugs/vulnerabilities will not include you in the WonderCMS reward system.

Demo page not working

VIsit https://www.wondercms.com/demo/

You will get this error:

The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
This problem can sometimes be caused by disabling or refusing to accept cookies.

Visit any other page after that, and you will see this notification:

screenshot-2018-3-3 wondercms - one of the smallest flat file cms - home 1

OS: Ubuntu 14.04
Browser: Firefox Quantum

Undefined index 'page'

Undefined index 'page' in line 92

Change to fix:
92 if (isset($_GET['page']) && $_GET['page'] == wCMS::get('config','login')) ........

[SOLVED - update deployed] Depreciated notice

Hi there, I'm a brand new user of your CMS. Just downloaded and set up a playground.

I got this error:

Deprecated: Non-static method wCMS::_updateOtherFiles() should not be called statically on line 37.

Changing line 13 to read:

public static function _updateOtherFiles() {

This appears to have fixed the problem without breaking anything else.

login URL doesn't work on local setup

@robiso
I liked the demo very much, so installed on local machine to play around.

On windows machines admin url is malformed
Instead of http://localhost/works/wondercms/loginURL I get http://localhostd/Works/wondercms/loginURL

I believe even if my work was inside apache's htdocs, I will still see the drive letter

Windows Setup
Apache 2.4, PHP7 > in C drive
My works are under D:\works\work_sub_folder

My Solution

I replaced INC_ROOT in function url with this dirname($_SERVER['SCRIPT_NAME'])

public static function url($location = null) { return (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].str_replace($_SERVER['DOCUMENT_ROOT'], '', str_replace('\\', '/', INC_ROOT))."/{$location}"; }

Add requirements in wiki

Hi,

I think, that there should be some more points in the wiki Requirements part:

  • Apache Module mod_rewrite
  • PHP mbstring extension
  • PHP curl extension

What do you think?

[OPINION/share yours] Should we limit file types in the file uploader?

Short discussion description

  • Since version 2.3.0, the built in WonderCMS file uploader accepts ANY file type, not just pictures.
  • This brings great responsibility to the admin user. The admin user must NOT upload malicious files that could harm their own website.
  • Some people have voiced their opinion that this is bad and that the user could harm himself by uploading any malicious files.

Below are arguments for and against this uploading any file type feature

Arguments to keep this feature (uploading any files)

  • This is similar functionality to FTP/SSH uploading (no limits).
  • Only the admin can upload files:
    • meaning if the admin wants to hurt his/her website, there are other channels to do self-harm than the simple file uploader.
  • We've removed this limit to enable users to upload whatever extension they want.

Arguments to limit this feature to just uploading pictures

  • User can not inflict harm to their website through the file uploader (but can still do this via FTP/SSH/other channels).
  • If the user gets compromised, an attacker can upload whatever they want in their files directory.

How can the user be compromised?

  • Sharing their password.
  • Sharing their login URL, which could lead to password brute forcing.
    • It is very important to keep your login URL safe for cases like this.

What happens when an user in a shared environment gets compromised?

  • Shared hosting plans usually have a protection in place, a protection that limits the user only to their account - so no further damager could be done (to other users on the same hosting plan):
    • the user inflicts damage only upon himself and his website (and no other users on the same shared hosting plan).

[Discussion] WonderCMS future improvements/requests

This thread is closed. NEW DISCUSSION THREAD: #41

Hello everyone. We need your help with improving WonderCMS.

Roadmap

  1. Spread the word about WonderCMS.
  2. Add special section on WonderCMS website for plugins and themes
  • Automate the process of reading themes/plugins from GitHub and display them on the WonderCMS website in a searchable and paginated way (numbered pages).
  1. Additional code review/optimisation
  • WonderCMS index.php is around 550 lines of PHP long
    • WonderCMS runs on 51 functions

Finished improvements from roadmap

1. Clean(er) URL's (short problem description: spaces and special characters URL handling + saving to database and displaying them in menu)
Long problem description and example:
When an user enters "my new page" in their menu at their example.com domain, spaces aren't stripped and the URL is example.com/my new page. The solution would be to replace spaces with the "-" character so the URL would be example.com/my-new-page.
1a. But what about all other special characters? And what "URL" are we going to save in the database in those cases.
1b. Once we update WonderCMS with this feature, how do we handle the user page names in their database.js to avoid an upgrading mess?
1c. After all this, we still need to display pages in the menu exactly the user entered them.
EDIT: this looks promising: http://cubiq.org/the-perfect-php-clean-url-generator
**IN WORK: @wdj-ac has started working on this, contribute if you can: https://github.com/wdj-ac/wondercms/issues/
- DONE, thanks to @wdj-ac (Pascal Jordin)

2. Display all pages in the settings panel and additionally include some "hide from menu" functionality.
Problem: There's currently no "full list" of pages in the settings. A solution to this would be to view the database.js but that's definitely a hassle. We need a simple way to display all pages and a checkbox in the current page settings menu, that would enabe the user to hide the page from the menu.
**IN WORK: @wdj-ac has started working on this, contribute if you can: https://github.com/wdj-ac/wondercms/issues/
- DONE, thanks to @wdj-ac (Pascal Jordin)

3. Enable users to install plugins via the settings panel. (Almost done, test version in near the end)
3a. This should be an input text field, which would take a ZIP link (allowed only from github.com domain) and extract it to the users plugin folder.
3b. Enable users to update their plugin with a new ZIP link (if the plugin name is the same).
3c. Simple plugin list (list all plugins from plugins folder)
3d. Enable users to easily remove a plugin (from the plugin list, a small "X" would do and a confirm dialog).
3e. Same functionality for themes (we will probably need an extra field for this, possibly a check box to choose between installing a plugin or a theme to avoid two text fields).

The solution to the possible improvements should be small and clean in terms of code.

If you find an awesome solution, we will gladly list you and your website on wondercms.com/special-contributors and the official WonderCMS download page wondercms.com/latest. If our donation fund isn't empty, you're also rewarded with a donation.

Blocks cannot be edited if text start is an HTML tag

By default, you can use HTML tags inside your blocks (like <b>, <table>, <div> and so on), and that goes fine until you are saving your block, and that block is starting from an HTML tag, that is represented as a block (let's say <div>).

If so, you can't edit your text anymore and will lose all your content after next saving. Since we are wrapping a text into <span> block (and <span> is inline element by default), <div> or <p> element will 'pop-out' of editable <span> tag.

[SELF-XSS] Cross site scripting vulnerabilty found in add page

• Wonder cms: v-2.5.2
• PHP Version: 5.6.35
• Apache Version: 2.4.33
• Operating system: microsoft windows v10

Vulnerabilty name: cross site scripting.

Steps to reproduce:

1: go in settings->general->addpage.
2: In the content of page execute malicious javascript "><script>alert(1)</script> and save the page.
3: XSS payload will be reflected to the browser.

POC:
Type payload ">script>alert(1)</script>
ss

Regards
RItesh Kumar

Cross-Frame Scripting / Iframe Injection

Discription:
Cross-Frame Scripting (XFS) is an attack that combines malicious JavaScript with an iframe that loads a legitimate page in an effort to steal data from an unsuspecting user. This attack is usually only successful when combined with social engineering. An example would consist of an attacker convincing the user to navigate to a web page the attacker controls. The attacker's page then loads malicious JavaScript and an HTML iframe pointing to a legitimate site. Once the user enters credentials into the legitimate site within the iframe, the malicious JavaScript steals the keystrok.

Impact: Critical
Solution:
Where possible do not use users' input for URLs.
If you definitely need dynamic URLs, make a list of valid accepted URLs and do not accept other URLs.
Ensure that you only accept URLs which are located on accepted domains.
POC:

  1. access the url http://127.0.0.1:880/wondercms-master/
  2. edit Home parameter and add payload add as

Payload1:

<iframe src="http://evil.com" < <IFRAME SRC="javascript:alert('XSS');"></iframe>

Payload2:

Payload3:

<iframe src="#" onmouseover="alert(document.cookie)"></iframe>

Payload4:

  1. observer the response and will get evil site loaded in side the frames.

1
3
iframe injection

kes.

Plugin Modern Setting error

Hi,
Plugin Modern Setting runing on wcms version 2.4

Catchable fatal error: Object of class stdClass could not be converted to string in
plugins/_modern_settings/_modern_settings.php on line 180

[VOTE] Choose between 4 WonderCMS designs

Dear community, please cast your vote (1, 2, 3, 4)

1 (black ribbon)

image

2 (purple ribbon)

image

3 (black ribbon with space/astronaut background)

image

4 (purple ribbon with space/astronaut background)

wcms-4

WonderCMS 2.4.0 - code review/comment before December release

Help us out: we need reviews/possible improvements on version 2.4.0: https://github.com/robiso/WonderCMS-testRepo/blob/master/index.php

Whats new:

  • A more clear definition of public/private functions. We need reviews mostly on this.
  • Corrected code logic in theme/plugin installer with an array check. Thanks to reddit user: Vekien
  • Added hash_equals checks to prevent CSRF timing attacks. Thanks to reddit users: ayeshrajans, [Vekien](https://www.reddit.com/user/vekien.
  • Prettified code fixes (PSR-2 - with a few minor exceptions), much easier to review the whole core (index.php).
  • Added link to WonderCMS homepage in the Settings panel.
  • Minor text changes to the Settings panel and error messages.
  • CSS fix, removed bottom border on the settings panel links. The border was visible only when designing a new theme/template from scratch.
  • Functions renamed (removed _) and re-sorted alphabetically for easier overview.

Note: Additional contents plugin will need to be updated with this release in late December.
Fun fact: WonderCMS consists of 46 functions.

Easier review

Below is 2.4.0 index.php with all changes in effect except for alphabetical re-order (for easier code review from new to old).
robiso/WonderCMS-testRepo@38cd183

Any other improvements are also welcome (for example, the deleteFileThemePluginAction function is possibly left out for improvement), all other optimizations are also welcome.

As always, contributors get a special thanks in the release notes on https://www.wondercms.com/whatsnew and in the community + GitHub release notes. The second we get something in the donations fund, we'll distribute the donations between those developers like we have in the past, please don't expect much as we (surprisingly) don't get much in donations.

A short list of people that are pending a donation reward for their contributions:

@xss @anolis @gakowalski @Alamantus @yassineaddi (some of you have been already rewarded, but I personally feel you deserve more for contributing to this project)

[SOLVED] Nginx & PHP-FPM Issue

Hello!

Thank you for WonderCMS! It's very easy and very powerfull engine. Looks like a magic :)
I have an issue about WonderCMS at the Nginx environment. I can't to get access to loginURL or example page.
I try to use the recomendation from this page: https://github.com/robiso/wondercms/wiki/NGINX-server-config . But in PHP-FPM
Message in the Nginx logfile:
[23-Mar-2017 14:12:48 Asia/Singapore] PHP Notice: Undefined index: page in /var/vhosts/stty/www/index.php on line 91
Thank you!

[1.0.0 released - additional requests made] Social networks block

[Plugin request] Social network(s) block

  • Enable users to enter their social network links.
  • Every time a social network link is filled, its displayed somewhere on the page (footer block or something similar).

What social networks should this plugin include?

  • Open for discussion or chosen by plugin author(s).

CKeditor plugin

Hi
I'm trying to make a CKeditor plugin, but am quite a newbie with JS.

My problem is with the blur+save staff in my hook-admin-richText.php file which for now looks like the folowing:

        var stopBlur = false;
        a.html("<textarea "+title+"name=\"textarea\" id=\""+ a.attr('id') +"_field\" class=\"editable\" contenteditable=\"true\">" + a.html() + "</textarea>");
        editor = a.find('textarea');
        editor.ckeditor({focus: function(){stopBlur=true;setTimeout(function(){stopBlur=false;},200);},blur: function(){setTimeout(function(){if(stopBlur)return;fieldSave(a.attr('id'),a.find('textarea.editor.getData()').html());},50)}});

        $('div.ckeditor').click(function(){
            stopBlur = true;
            setTimeout(function(){stopBlur = false;},200);
            a.find('div.ckeditor').focus();
        });
        a.find('div.ckeditor').focus();

[Plugin request] Simple blog functionality

Simple blog functionality

  • One of the ways to display contents from other pages on one page would be (example) <?php echo wCMS::get('pages', 'about')->content; ?> for fetching the contents of the page about.

  • Another way (posted by wdj) with additional display of titles, description

<?php if (wCMS::$currentPage == 'home'): ?> <!-- What page to display this on -->
        <div class="container marginTop20">
            <?php foreach ( wCMS::db()->pages as $pageName => $page ): ?> <!-- loop though all pages -->
            <div class="col-xs-12 col-md-4">
                <div><a href="<?=$pageName?>"><?=$page->title; ?></a></div>
	            <div><?=$page->description; ?></div>
                <a href="<?=$pageName?>">more...</a>
            </div>
            <?php endforeach; ?>
        </div>
<?php endif ?>
  • This blog functionality should possibly involve a pagination option, so the users can choose how many posts they want to display on a specific page.
  • Additional plus: a way to include only a snippet of the blog/page ("read more" link)
    • in a case where the user would set a limit on how many characters of the blog post/page would be shown - a "read more" link would be appear

Edit function

Hi,

Newly made pages result in 403.
If there is any info you need from my setup?

Sorry, noticed your comment about keeping discussion on the forum too late.
Will open thread there.

[edit] Found one of the reasons why people might be getting a 403.
It is a conflict between virtual url and actual url. Making a menu item called 'gallery' shows as www.example.com/gallery/ (note the last slash) if there is a folder in the root called 'gallery' (or even 'gallery01'). The new menu item will be trying to open an actual folder.

pagename that ends with a questionmark

@robiso
in the menu bar at the top, if you have a pagename that ends with a questionmark then the highlighting doesn't work anymore.

my setup:
Server version: Apache/2.4.18 (Ubuntu)

example:
in the following example, if you click on "FRAGEN?" it will not highlight as it is supposed to do.

should be easy to reproduce and hopefully easy to solve.

kind regards
kroovy

Your WonderCMS version is out of date

I get this message when starting admin.
Now, my index file has '2.0.6'
and the file 'version' I have edited to have '2.0.6.'

But still I get 'Your WonderCMS version is out of date.'
Where is this problem coming from?

The message disappear when I have worked a while in the admin.

[SELF-XSS] Improper sanitisaion of tags

Hi Team,

Here the CMS is vulnerable to improper sanitization which leads to execution of javascript and HTML codes.
So, can be used maliciously

image

Here in the above image Page Title, Page Description and Page Keyword are vulnerable.

This is the POC image of a successful attack.
image

Plugin adding issue

Contact form is unusable when you not skilled with PHP language.
When i change, theme, then loose my extended functionality, like above.

Session Fixation

Wonder CMS 2.5.1 is prone to session fixation attack.
1.The Session Fixation attack fixes a session on the victim's browser, so the attack starts before the user logs in.
2.An attacker creates a new session on a web application and records the associated session identifier. The attacker then causes the victim to authenticate against the server using the same session identifier.
3.The attacker can access to the user's account through the active session
4.When authenticating a user, it doesn’t assign a new session ID, making it possible to use an existent session ID.
Let's see the session values before login

before login

Session Values after Login:

afterlogin

Mitigation:
The application should always first invalidate the existing session ID before authenticating a user, and if the authentication is successful, provide another sessionID.

[SVG feature - public discussion] SVG XSS on file upload

Hi Team,

I have found stored Cross-Site scripting on WonderCMS 2.4.0

In Index.php there is a function "uploadFileAction()"

It does not sanitize svg file and it is possible to execute a Cross-Site Scripting XSS attacks.

Already sent email to [email protected], and work with all modern browser. hope you can fix it asap.

xss

When you fix the bug, please, can you include my name in the release notes when the bug will be corrected? Tanmay [email protected]

[Feature + theme/plugin request] Blog system

An implementation of permissions would be something cool, for instance, "editor" rank can create pages and edit pages but not access the security area of the admin panel or upload files/plugins and is unable to change the theme of the website.

This permissions system should be fairly easy to implement with PHP and i will perhaps attempt to implement this feature myself shortly. I think alongside this i will attempt to code and implement a basic blogging system which would in turn allow the user to not only run blogs on the CMS but also assign people to edit blog posts and pages, but not allow them full access to the sites functions.

  • Thanks!

Screenshots:
Blog test i have made: http://prntscr.com/ia4sz5

Page availability

When you change page visibility in GENERAL tab of settings window. User still can access this page via full known url. I recommend redirecting to 404 error page.

Pulling Version Number Not Working

I had an old version of WonderCMS installed while testing the version 2.1.0, and was not prompted for an upgrade. I believe we need to use the Github API to accurately get the raw files rather than using raw.githubusercontent.com.

Here is a Stackoverflow article that makes me think this is so: https://stackoverflow.com/a/22314262

I don't know why it worked in the past and doesn't seem to be working now, but things change with APIs and file access pretty frequently with larger content hosting sites like Github, so maybe something changed recently?

I'll work on figuring the API out and get a pull request up to fix this as soon as I can.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.