Announcement

#1 2020-10-08 00:21:57

dd-b
Member
Minneapolis, MN USA
2018-04-16
70

Security issue: database access info stored in world-read file

In a test install, netinstall, when I got around to looking what it did with the database config info I entered, I found this:

Code:

dh_akhcfg@william-floyd:~/gal02.dd-b.net/piwigo/local/config$ ls -l
total 8
-rw-rw-rw- 1 dh_akhcfg pg75234 319 Oct  7 13:48 database.inc.php
-rwxr-xr-x 1 dh_akhcfg pg75234 610 Oct  7 13:36 index.php

database.inc.php, which contains the host, user, password, and database names, is world write!!!! (not just read).

Even read would be a huge security hole (it gives everybody who can read world-readable files on the server full access to the database).

Changing the protection of database.inc.php to 600 does not immediately seem to have broken anything, but I haven't done more than the most minimal testing, enough to establish it can still access the database.

    Piwigo 2.10.2
    Operating system: Linux
    PHP: 7.2.30 (Show info) [2020-10-07 15:17:11]
    MySQL: 5.7.29-log [2020-10-07 15:17:11]
    Graphics Library: ImageMagick 6.9.7-4

Offline

 

#2 2020-10-11 10:02:04

dd-b
Member
Minneapolis, MN USA
2018-04-16
70

Re: Security issue: database access info stored in world-read file

I've reported this as an issue on GitHub, it's #1227

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact