An integer overflow in the calculated message size of a query or bind message could allow a single large message to be sent as multiple messages under the attacker's control. This could lead to SQL injection if an attacker can cause a single query or bind message to exceed 4 GB in size.
{ "review_status": "REVIEWED", "url": "https://pkg.go.dev/vuln/GO-2024-2606" }
{ "imports": [ { "path": "github.com/jackc/pgproto3/v2", "symbols": [ "AuthenticationCleartextPassword.Encode", "AuthenticationGSS.Encode", "AuthenticationGSSContinue.Encode", "AuthenticationMD5Password.Encode", "AuthenticationOk.Encode", "AuthenticationSASL.Encode", "AuthenticationSASLContinue.Encode", "AuthenticationSASLFinal.Encode", "Backend.Send", "BackendKeyData.Encode", "Bind.Encode", "BindComplete.Encode", "CancelRequest.Encode", "Close.Encode", "CloseComplete.Encode", "CommandComplete.Encode", "CopyBothResponse.Encode", "CopyData.Encode", "CopyDone.Encode", "CopyFail.Encode", "CopyInResponse.Encode", "CopyOutResponse.Encode", "DataRow.Encode", "Describe.Encode", "EmptyQueryResponse.Encode", "ErrorResponse.Encode", "ErrorResponse.marshalBinary", "Execute.Encode", "Flush.Encode", "Frontend.Send", "FunctionCall.Encode", "FunctionCallResponse.Encode", "GSSEncRequest.Encode", "GSSResponse.Encode", "NoData.Encode", "NoticeResponse.Encode", "NotificationResponse.Encode", "ParameterDescription.Encode", "ParameterStatus.Encode", "Parse.Encode", "ParseComplete.Encode", "PasswordMessage.Encode", "PortalSuspended.Encode", "Query.Encode", "ReadyForQuery.Encode", "RowDescription.Encode", "SASLInitialResponse.Encode", "SASLResponse.Encode", "SSLRequest.Encode", "StartupMessage.Encode", "Sync.Encode", "Terminate.Encode" ] }, { "path": "github.com/jackc/pgproto3/v2/example/pgfortune", "symbols": [ "PgFortuneBackend.Run", "PgFortuneBackend.handleStartup", "main" ] } ] }
{ "imports": [ { "path": "github.com/jackc/pgx/v5/internal/sanitize", "symbols": [ "Query.Sanitize", "SanitizeSQL" ] }, { "path": "github.com/jackc/pgx/v5/pgproto3", "symbols": [ "AuthenticationCleartextPassword.Encode", "AuthenticationGSS.Encode", "AuthenticationGSSContinue.Encode", "AuthenticationMD5Password.Encode", "AuthenticationOk.Encode", "AuthenticationSASL.Encode", "AuthenticationSASLContinue.Encode", "AuthenticationSASLFinal.Encode", "Backend.Flush", "Backend.Send", "BackendKeyData.Encode", "Bind.Encode", "BindComplete.Encode", "CancelRequest.Encode", "Close.Encode", "CloseComplete.Encode", "CommandComplete.Encode", "CopyBothResponse.Encode", "CopyData.Encode", "CopyDone.Encode", "CopyFail.Encode", "CopyInResponse.Encode", "CopyOutResponse.Encode", "DataRow.Encode", "Describe.Encode", "EmptyQueryResponse.Encode", "ErrorResponse.Encode", "ErrorResponse.marshalBinary", "Execute.Encode", "Flush.Encode", "Frontend.Flush", "Frontend.Send", "Frontend.SendBind", "Frontend.SendClose", "Frontend.SendDescribe", "Frontend.SendExecute", "Frontend.SendParse", "Frontend.SendQuery", "Frontend.SendSync", "Frontend.SendUnbufferedEncodedCopyData", "FunctionCall.Encode", "FunctionCallResponse.Encode", "GSSEncRequest.Encode", "GSSResponse.Encode", "NoData.Encode", "NoticeResponse.Encode", "NotificationResponse.Encode", "ParameterDescription.Encode", "ParameterStatus.Encode", "Parse.Encode", "ParseComplete.Encode", "PasswordMessage.Encode", "PortalSuspended.Encode", "Query.Encode", "ReadyForQuery.Encode", "RowDescription.Encode", "SASLInitialResponse.Encode", "SASLResponse.Encode", "SSLRequest.Encode", "StartupMessage.Encode", "Sync.Encode", "Terminate.Encode" ] }, { "path": "github.com/jackc/pgx/v5/pgconn", "symbols": [ "Batch.ExecParams", "Batch.ExecPrepared", "Connect", "ConnectConfig", "ConnectWithOptions", "MultiResultReader.Close", "MultiResultReader.NextResult", "MultiResultReader.ReadAll", "PgConn.CheckConn", "PgConn.Close", "PgConn.CopyFrom", "PgConn.CopyTo", "PgConn.Deallocate", "PgConn.Exec", "PgConn.ExecBatch", "PgConn.ExecParams", "PgConn.ExecPrepared", "PgConn.Ping", "PgConn.Prepare", "PgConn.ReceiveMessage", "PgConn.SyncConn", "PgConn.WaitForNotification", "Pipeline.Close", "Pipeline.Flush", "Pipeline.GetResults", "Pipeline.SendDeallocate", "Pipeline.SendPrepare", "Pipeline.SendQueryParams", "Pipeline.SendQueryPrepared", "Pipeline.Sync", "ResultReader.Close", "ResultReader.NextRow", "ResultReader.Read", "ValidateConnectTargetSessionAttrsPreferStandby", "ValidateConnectTargetSessionAttrsPrimary", "ValidateConnectTargetSessionAttrsReadOnly", "ValidateConnectTargetSessionAttrsReadWrite", "ValidateConnectTargetSessionAttrsStandby" ] }, { "path": "github.com/jackc/pgx/v5/pgproto3/example/pgfortune", "symbols": [ "PgFortuneBackend.Run", "PgFortuneBackend.handleStartup", "main" ] } ] }