# Dolibarr security : Without install.lock file, Dolibarr is vunerable

**URL:** <https://www.dolibarr.org/forum/t/dolibarr-security-without-install-lock-file-dolibarr-is-vunerable/23061>\
**Category:** Announcements & news\
**Tags:** Security\
**Created:** [November 15, 2022, 9:13pm UTC](https://www.dolibarr.org/forum/t/dolibarr-security-without-install-lock-file-dolibarr-is-vunerable/23061 "2022-11-15T21:13:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ksar](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/ksar/32/514_2.png) [@ksar](https://www.dolibarr.org/forum/u/ksar)\
**Post date:** [November 15, 2022, 9:13pm UTC](https://www.dolibarr.org/forum/t/dolibarr-security-without-install-lock-file-dolibarr-is-vunerable/23061/1 "2022-11-15T21:13:23Z")

</div>

Hello all,

To all integrators, developers (or even self-hosted installation users) who have **Dolibarr accessible from the internet** , **be sure to put/create an install.lock file** in your document folder. (Where is this folder ? during installation you chose it, if not look in your conf/conf.php file)

An exploitation, documented on specialized sites, allows admin account creation and then code execution on your server. This exploitation has already been reported on some Dolibarr “badly” installed.  
Code execution =\> the hacker will be able to do what he wants on your server, encrypt it, recover your database, spam, you have your online store or your website on the same server, the same…, in short all that can be done with a server on the Internet

This is not a direct security vulnerability of Dolibarr, because it is a good practice and Dolibarr tell you when you did not do it (on the home page).  
If you leave the keys on the door when you are told not to do it…

Thanks to @FHenry that reported today the exploitation of “weak” Dolibarr’s

---

<div class="post-metadata">

**Author:** ![ksar](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/ksar/32/514_2.png) [@ksar](https://www.dolibarr.org/forum/u/ksar)\
**Post date:** [November 15, 2022, 9:14pm UTC](https://www.dolibarr.org/forum/t/dolibarr-security-without-install-lock-file-dolibarr-is-vunerable/23061/2 "2022-11-15T21:14:15Z")

</div>



---

<div class="post-metadata">

**Author:** ![milenmk](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/milenmk/32/4128_2.png) [@milenmk](https://www.dolibarr.org/forum/u/milenmk)\
**Post date:** [November 16, 2022, 8:51am UTC](https://www.dolibarr.org/forum/t/dolibarr-security-without-install-lock-file-dolibarr-is-vunerable/23061/3 "2022-11-16T08:51:19Z")

</div>

Why not modify the install script to create the file by itself on the first installation? I think it won’t be too hard.

---

<div class="post-metadata">

**Author:** ![ksar](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/ksar/32/514_2.png) [@ksar](https://www.dolibarr.org/forum/u/ksar)\
**Post date:** [November 16, 2022, 9:37am UTC](https://www.dolibarr.org/forum/t/dolibarr-security-without-install-lock-file-dolibarr-is-vunerable/23061/4 "2022-11-16T09:37:52Z")

</div>

Hello,

There is a global constant for that : MAIN\_ALWAYS\_CREATE\_LOCK\_AFTER\_LAST\_UPGRADE  
But not activated by default.

Ongoing corrective PR are proposed :

1. [fix: always display security warning on home page by FHenry · Pull Request #22858 · Dolibarr/dolibarr · GitHub](https://github.com/Dolibarr/dolibarr/pull/22858)
2. [FIX: base64\_decode shloud be forbiden in dol\_eval by FHenry · Pull Request #22863 · Dolibarr/dolibarr · GitHub](https://github.com/Dolibarr/dolibarr/pull/22863)
3. [FIX SECURITY don't create an admin if an admin already exists by hregis · Pull Request #22862 · Dolibarr/dolibarr · GitHub](https://github.com/Dolibarr/dolibarr/pull/22862)

---

<div class="post-metadata">

**Author:** ![ksar](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/ksar/32/514_2.png) [@ksar](https://www.dolibarr.org/forum/u/ksar)\
**Post date:** [November 30, 2022, 12:23pm UTC](https://www.dolibarr.org/forum/t/dolibarr-security-without-install-lock-file-dolibarr-is-vunerable/23061/5 "2022-11-30T12:23:52Z")

</div>

Hello,

Dolibarr V16.0.3 integrate some Security FIX that prevent current attack to work.  
But, without install.lock, your installation is vulnerable, at least to new admin creation.

---

<div class="post-metadata">

**Author:** ![deonallen84](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/d/b5a626/32.png) [@deonallen84](https://www.dolibarr.org/forum/u/deonallen84)\
**Post date:** [January 31, 2023, 8:45pm UTC](https://www.dolibarr.org/forum/t/dolibarr-security-without-install-lock-file-dolibarr-is-vunerable/23061/6 "2023-01-31T20:45:45Z")

</div>

Any one know the release date fo 17 today is the 31st of January.
