GNU GPL #
The license under which the WordPress software is released is the GPLv2 (or later) from the Free Software Foundation. A copy of the license is included with every copy of WordPress, but you can also read the text of the license here.
Third Party Libraries #
Third-Party libraries must be GPLv2 compatible, but retain their own copyright.
Contributor Copyright #
As a contributor, you retain the copyright to your code, however by submitting it to trac you are releasing it under the GPLv2.