Ticket #4012 (closed defect (bug): fixed)

Opened 5 years ago

Last modified 5 years ago

XSS on page-new.php

Reported by: xknown Owned by: anonymous
Priority: highest omg bbq Milestone: 2.0.10
Component: Security Version: 2.1.2
Severity: normal Keywords: 2nd-opinion dev-feedback
Cc: charleshooper

Description

Someone posted on  sla.cker.org forums a new XSS vulnerability that affects all versions, including the trunk.

Attachments

link-template.diff Download (305 bytes) - added by xknown 5 years ago.
Cast to int page id

Change History

xknown5 years ago

Cast to int page id

The given PoC is:  http://wp/wp-admin/page-new.php?saved="><script>alert(123)</script>

PS. The patch is only for the trunk

comment:2   ryan5 years ago

  • Status changed from new to closed
  • Resolution set to fixed

(In [5078]) Cast to int. Props xknown. fixes #4012 for trunk.

comment:3   ryan5 years ago

(In [5079]) Cast to int. Props xknown. fixes #4012 for 2.1

  • Cc charleshooper added
  • Keywords 2nd-opinion dev-feedback added
  • Status changed from closed to reopened
  • Resolution fixed deleted

Not to step on any toes as I understand this is a high priority item, however is casting to int adequate? I'm referring to the fact that wp_posts.ID is a BIGINT-sized column and the maximum size integer on 32-bit systems is 2,147,483,647. Not that I think many people out there have over 2 billion posts, but I feel that if we impose a limit (by casting a variable to int) then we should update the schema accordingly. Think of it as a SQL optimization if you must.

  • Status changed from reopened to closed
  • Resolution set to fixed

I just took a look at the schema and also noticed that other tables create their relative post_ID fields as INT(11), I'll close this again and open another ticket as they are separate issues.

comment:6   ryan5 years ago

  • Status changed from closed to reopened
  • Resolution fixed deleted
  • Milestone changed from 2.1.3 to 2.0.10

Reopening for 2.0 inclusion.

comment:7   ryan5 years ago

  • Status changed from reopened to closed
  • Resolution set to fixed

(In [5080]) Cast to int. Props xknown. fixes #4012 for 2.0

Note: See TracTickets for help on using tickets.