NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Legacy (v4.x and earlier) v
« Previous 1 … 37 38 39 40 41 … 433 Next »
SQL injection bug in EPG search

SQL injection bug in EPG search
sgilani
Offline

Senior Member

Posts: 730
Threads: 72
Joined: Jan 2006
#1
2018-11-25, 06:11 AM
Hey sub, looks like there's a potential Bobby Tables going on. :p

easy repro, search the epg for "can't" and the logs reveal it. This would be a nasty attack vector potentially via Kodi. At the very least, search won't work properly.

Code:
2018-11-24 22:05:01.912    [ERROR][1]    Unexpected error in FirstLetterSearch(): System.Data.SQLite.SQLiteException (0x80004005): SQL logic error or missing databasenear "t": syntax error
   at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain)
   at System.Data.SQLite.SQLiteCommand.BuildNextCommand()
   at System.Data.SQLite.SQLiteCommand.GetStatement(Int32 index)
   at System.Data.SQLite.SQLiteDataReader.NextResult()
   at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
   at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.SQLite.SQLiteCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.ExecuteReader()
   at NextPVR.TV.SearchGuide.FreeTextSearch(String freeText)
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,661
Threads: 767
Joined: Nov 2003
#2
2018-11-25, 06:46 AM
sgilani Wrote:Hey sub, looks like there's a potential Bobby Tables going on. :p
The attached patch fixes this bug in the NextPVR search screen.

In general, the app doesn't usually construct sql. This screen did though.

Quote:easy repro, search the epg for "can't" and the logs reveal it. This would be a nasty attack vector potentially via Kodi. At the very least, search won't work properly.
Kodi doesn't call a search API on the NextPVR. There is a network callable search api though, used by the iOS/Android clients, but it's unrelated to the implementation used on that screen, and doesn't construct sql, and not susceptible to this type of problem.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Search titles and descriptions mcbo84 3 1,720 2020-04-15, 01:21 PM
Last Post: Graham
  Adding a key mapping for Search sgilani 2 1,023 2018-11-25, 03:00 AM
Last Post: sgilani
  "Search" function on modern web interface? uspino 3 2,051 2017-12-25, 04:47 PM
Last Post: sub
  Search not highlighting pending recording jdwirtz 0 790 2017-10-03, 02:42 PM
Last Post: jdwirtz
  Better search? spiinnaker 2 1,178 2016-07-12, 07:48 PM
Last Post: mvallevand
  Wrong Frequency search DVB-T Sydney, Australia Waratah 2 1,828 2016-06-27, 05:52 AM
Last Post: hyperactive
  "Video" selection screenlike "Search" - Navigation problems puck64 8 2,788 2016-05-07, 11:11 AM
Last Post: puck64
  Search Plugin not working NextPVR 3.6.6 octopus 2 1,505 2016-01-08, 03:01 AM
Last Post: octopus
  Comskip goes into infinite search on some files after upgrade to 3.4.8 HarryH3 10 3,234 2015-11-21, 05:54 AM
Last Post: jghanisco
  Search menu HotKey jrockow 2 1,400 2015-11-15, 12:31 AM
Last Post: jrockow

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode