Autor Beitrag
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Mi 06.07.05 18:49 
Hallo!

Heute ist eine Sicherheitslücke in phpBB 2.0.16 bekannt geworden, welche es erlaubt, Javascript einzuschleusen und damit z.B. die Auto-Login-ID von Nutzern auszulesen. Darauf aufmerksam geworden bin ich durch eine entsprechende Meldungen in der DP. Daniel und ich haben dann an einem Fix gebastelt, welchen ich Euch nicht vorenthalten möchte:

In der Datei /includes/bbcode.php müsst Ihr folgenden Code
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
  $patterns[] = "#\[url\]([\w]+?://[^ \"\n\r\t<]*?)\[/url\]#is";
  $replacements[] = $bbcode_tpl['url1'];

  // [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
  $patterns[] = "#\[url\]((www|ftp)\.[^ \"\n\r\t<]*?)\[/url\]#is";
  $replacements[] = $bbcode_tpl['url2'];

  // [url=xxxx://www.phpbb.com]phpBB[/url] code..
  $patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";
  $replacements[] = $bbcode_tpl['url3'];

  // [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
  $patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";


durch diesen ersetzen:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
  $patterns[] = "#\[url\]([\w]+?://[^ '`\"\n\r\t<]*?)\[/url\]#is";
  $replacements[] = $bbcode_tpl['url1'];

  // [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
  $patterns[] = "#\[url\]((www|ftp)\.[^ '`\"\n\r\t<]*?)\[/url\]#is";
  $replacements[] = $bbcode_tpl['url2'];

  // [url=xxxx://www.phpbb.com]phpBB[/url] code..
  $patterns[] = "#\[url=([\w]+?://[^ '`\"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";
  $replacements[] = $bbcode_tpl['url3'];

  // [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
  $patterns[] = "#\[url=((www|ftp)\.[^ '`\"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";


Ich gehe mal davon aus, dass die Jungs von phpBB noch einen eigenen Fix rausbringen werden, aber mit dem da oben sollte der Exploit erst einmal abgewehrt sein ;-)

Grüße
Christian

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
maxk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1696
Erhaltene Danke: 1

Win XP, Debian Lenny
Delphi 6 Personal
BeitragVerfasst: Mi 06.07.05 19:27 
Schonwieder ein Sicherheitsproblem :?
Auf jeden Fall aber Danke für das Fix!

_________________
Ein Computer wird das tun, was Du programmierst - nicht das, was Du willst.
Christian S. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Di 19.07.05 23:36 
Hallo!

phpBB 2.0.17 ist erschienen. Das Beste ist es, nun den obigen durch den offiziellen Patch zu ersetzen!

Grüße
Christian

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".