Waraxe IT Security Portal
Login or Register
October 9, 2026
Menu
Home
Logout
Discussions
Forums
Members List
IRC chat
Tools
Base64 coder
MD5 hash
CRC32 checksum
ROT13 coder
SHA-1 hash
URL-decoder
Sql Char Encoder
Affiliates
y3dips ITsec
Md5 Cracker
User Manuals
AlbumNow
Content
Content
Sections
FAQ
Top
Info
Feedback
Recommend Us
Search
Journal
Your Account
User Info
Welcome, Anonymous
Nickname
Password
(Register)

Membership:
Latest: MichaelSnaRe
New Today: 0
New Yesterday: 0
Overall: 9144

People Online:
Visitors: 2366
Members: 0
Total: 2366
Full disclosure
[0day-rubbish] StreamSets Transformer 3.17.0 auth-mode none fallback and un-sandboxed ScalaDTransform execution to container root (8.1 primary)
[0day-rubbish] RCDevs WebADM 2.4.14 authenticated log viewer sid command injection to webadm uid 999 code execution (7.2)
[0day-rubbish] Maian Cart 3.8 addBanners unrestricted banner upload to PHP webshell and administrator command execution (7.2 primary, PR:H)
[0day-rubbish] IPConfigure Orchid VMS 26.3.0 authenticated DNF repository GPG-key property command injection to root (7.2)
[0day-rubbish] Circutor LineEds 24.11.14-r0 unauthenticated pwrstudio events.xml shellExecute command injection (9.8)
[0day-rubbish] Asustor ADM 3.5.9.RWM1 (AS602T) music.cgi act=live stored-filename command injection reaching system() (8.8 primary, PR:L)
[0day-rubbish] Advantech WebAccess Node 9.2.3 unauthenticated CrystalRpt.aspx file upload and path traversal to code execution in w3wp.exe (9.8)
SEC Consult Research 20261001 :: Arbitrary Email sender spoofing in Apple iCloud mail
SEC Consult SA-20260924-0 :: Multiple Vulnerabilities in Paessler PRTG Network Monitor #CVE-2026-4637 #CVE-2026-4638
[NotCVE-2026-0019] game-music-emu through 0.6.5 VGM Command Interpreter Missing Operand Length Check Allows Heap Out-of-Bounds Read
[NotCVE-2026-0018] game-music-emu (libgme) through 0.6.5 Unbounded GYM Command Loop Allows Heap Out-of-Bounds Read
[NotCVE-2026-0017] game-music-emu (libgme) 0.6.5 and Earlier AY Loader NULL Pointer Dereference Allows Denial of Service
[NotCVE-2026-0016] game-music-emu VGM Command Interpreter Unvalidated 0xE0 PCM Seek Offset Allows Out-of-Bounds Read and Denial of Service
APPLE-SA-09-28-2026-3 macOS Sequoia 15.8.1
APPLE-SA-09-28-2026-2 macOS Tahoe 26.7.1
Log in Register Forum FAQ Memberlist Search
IT Security and Insecurity Portal

www.waraxe.us Forum Index -> Php -> Link in forum
Post new topicReply to topic View previous topic :: View next topic
Link in forum
PostPosted: Sun Jan 13, 2008 9:54 am Reply with quote
shmk
Active user
Active user
Joined: Jul 22, 2004
Posts: 25




What's the most secure PHP filter that allow users to insert links to sites or images in a forum without flaws in security? (regarding xss and csrf overall)
View user's profile Send private message
PostPosted: Sun Jan 13, 2008 12:23 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




It's always possible to fool the security filters. Attacker can first place normal picture to remote server and then post img link to it. This will pass all security tests and posting will be allowed. After that attacker just changes original image on remote server with anything else he wants. Attacker can use Amapche's mod_rewrite, so that (victim) client browser will ask for jpg and will get 301/302 redirect pointing somewhere - classical CSRF case through GET method. I have seen more paranoid solutions, where webserver will check remote image validity within ANY request, and even this will not help, because image hosting server can serve different content based on client IP - so that checking webserver will see this as normal image, but subsequent victim browser will get mailicious CSRF redirection.
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Sun Jan 13, 2008 1:42 pm Reply with quote
shmk
Active user
Active user
Joined: Jul 22, 2004
Posts: 25




waraxe wrote:
It's always possible to fool the security filters. Attacker can first place normal picture to remote server and then post img link to it. This will pass all security tests and posting will be allowed. After that attacker just changes original image on remote server with anything else he wants. Attacker can use Amapche's mod_rewrite, so that (victim) client browser will ask for jpg and will get 301/302 redirect pointing somewhere - classical CSRF case through GET method. I have seen more paranoid solutions, where webserver will check remote image validity within ANY request, and even this will not help, because image hosting server can serve different content based on client IP - so that checking webserver will see this as normal image, but subsequent victim browser will get mailicious CSRF redirection.


So the only secure system is disable external links?
And a "quite" secure system? Rolling Eyes

The classical hidden token system could limit the CSRF or it's quite useless? (i saw it mainly in POST form but it could be used in GET too?)
View user's profile Send private message
PostPosted: Sun Jan 13, 2008 2:33 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




Anti-CSRF measures with random token or even with CAPTCHA (for critical requests) are very effective by my personal experience. So if you have securely written code with no potential CSRF threats, then linking remote images is not big security risk. But you must be sure about XSS too, because if there is XSS possibilities, then hidden token protection can be bypassed - because attacker can read token values right from html source or even submit POST forms without user interaction. Most secure anti-csrf still is CAPTCHA - critical operations, like new admin account creation, password change, file deletion - these are the situations, where CAPTCHA is useful.
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Sun Jan 13, 2008 3:02 pm Reply with quote
shmk
Active user
Active user
Joined: Jul 22, 2004
Posts: 25




waraxe wrote:
Anti-CSRF measures with random token or even with CAPTCHA (for critical requests) are very effective by my personal experience. So if you have securely written code with no potential CSRF threats, then linking remote images is not big security risk. But you must be sure about XSS too, because if there is XSS possibilities, then hidden token protection can be bypassed - because attacker can read token values right from html source or even submit POST forms without user interaction. Most secure anti-csrf still is CAPTCHA - critical operations, like new admin account creation, password change, file deletion - these are the situations, where CAPTCHA is useful.


Many thanks, so a token + capthca and maybe a verification email could block CSRF.

Now I need to analyze the BIG XSS problem Razz
At this time I have only a htmlentities(strip_tags(),ENT_QUOTES)
View user's profile Send private message
PostPosted: Mon Jan 14, 2008 9:51 pm Reply with quote
shmk
Active user
Active user
Joined: Jul 22, 2004
Posts: 25




waraxe wrote:
Attacker can first place normal picture to remote server and then post img link to it. This will pass all security tests and posting will be allowed. After that attacker just changes original image on remote server with anything else he wants.


With this stratagem every forum security could be bypassed? Yours PHPBB too? Very Happy
View user's profile Send private message
PostPosted: Mon Jan 14, 2008 11:08 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




Yes - in this forum remote images are allowed in postings so that CSRF possibilities are real.

Still - remote image can forge only GET request, and as much as i know and i have looked at phpbb source, most of the operations in user and admin control panel are based on POST method. So potential security impact is low here.

Bottom line - use POST as much as possible in any critical operations. This will cripple image-based CSRF attacks ... Smile
View user's profile Send private message Send e-mail Visit poster's website
Link in forum
www.waraxe.us Forum Index -> Php
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT
Page 1 of 1

Post new topicReply to topic


Powered by phpBB © 2001-2008 phpBB Group



PCWizardHub - Helping you fix, build, and optimize your PC life
All logos and trademarks in this site are property of their respective owner. The comments and posts are property of their posters, all the rest (c) 2004-2024 Janek Vind "waraxe"
Page Generation: 0.037 Seconds