Bug 1124582 - wp-config.php is world readable but may contain private data (database password)
Summary: wp-config.php is world readable but may contain private data (database password)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: wordpress
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Remi Collet
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-29 20:45 UTC by Adam Williamson
Modified: 2014-08-29 19:43 UTC (History)
3 users (show)

Fixed In Version: wordpress-3.9.2-3.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-21 09:44:57 UTC


Attachments (Terms of Use)

Description Adam Williamson 2014-07-29 20:45:54 UTC
I just noticed that wordpress.spec has:

%config(noreplace) %{_sysconfdir}/wordpress/wp-config.php

which results in ownership of root.root, permissions 0644. However, wp-config.php is quite likely to contain sensitive information, particularly the database password in plaintext:

/** MySQL database password */
define('DB_PASSWORD', 'PLAINTEXTPASSWORD');

as well as this whole chunk:

/**#@+
 * Authentication Unique Keys and Salts.
 *
 * Change these to different unique phrases!
 * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
 * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
 *
 * @since 2.6.0
 */

so I think it really ought to be root.apache , 0640.

Affects all releases, I believe, and possibly EPEL.

Comment 1 Fedora Update System 2014-08-07 14:57:04 UTC
wordpress-3.9.2-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/wordpress-3.9.2-2.fc19

Comment 2 Fedora Update System 2014-08-07 14:57:11 UTC
wordpress-3.9.2-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/wordpress-3.9.2-2.fc20

Comment 3 Fedora Update System 2014-08-07 14:59:16 UTC
wordpress-3.9.2-2.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/wordpress-3.9.2-2.el6

Comment 4 Fedora Update System 2014-08-07 14:59:23 UTC
wordpress-3.9.2-2.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/wordpress-3.9.2-2.el5

Comment 5 Fedora Update System 2014-08-08 00:41:30 UTC
Package wordpress-3.9.2-2.el5:
* should fix your issue,
* was pushed to the Fedora EPEL 5 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing wordpress-3.9.2-2.el5'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2014-2155/wordpress-3.9.2-2.el5
then log in and leave karma (feedback).

Comment 6 Remi Collet 2014-08-08 15:41:03 UTC
On recent RPM version (I need to check on older version), new permissions are not applied on package update.

So the new permissions will only apply to new install.

After update, you can use

    rpm --setperms wordpress

Comment 7 Remi Collet 2014-08-09 11:34:05 UTC
Issue with permission not updated on upgrade reported as RPM bug #1128359

Comment 8 Fedora Update System 2014-08-21 09:44:57 UTC
wordpress-3.9.2-3.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2014-08-23 01:58:49 UTC
wordpress-3.9.2-3.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2014-08-29 19:42:39 UTC
wordpress-3.9.2-3.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2014-08-29 19:43:28 UTC
wordpress-3.9.2-3.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.