Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2020-36316

In RELIC before 2021-04-03, there is a buffer overflow in PKCS#1 v1.5 signature verification because garbage bytes can be present.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2020-36316
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 12:36 UTC · Revision 1

Source evidence

CVE-2020-36316

core-osv · Original source

Published 7 Apr 2021, 21:15 UTC

In RELIC before 2021-04-03, there is a buffer overflow in PKCS#1 v1.5 signature verification because garbage bytes can be present.

osv:CVE-2020-36316
Complete source record
{
  "id": "0cca540edb3298174740c1f88f413cdc1027ecbcab696a7927d55466470cb6d9",
  "url": "https://osv.dev/vulnerability/CVE-2020-36316",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2020-36316",
    "summary": "In RELIC before 2021-04-03, there is a buffer overflow in PKCS#1 v1.5 signature verification because garbage bytes can be present.",
    "evidence": "osv:CVE-2020-36316",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2020-36316",
      "aliases": [
        "CVE-2020-36316"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/relic-toolkit/relic",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "76c9a1fdf19d9e92e566a77376673e522aae9f80"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "fixed": "76c9a1fdf19d9e92e566a77376673e522aae9f80"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "relic-toolkit-0.5.0",
            "relic-toolkit-0.4.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2020-36316.json",
            "vanir_signatures": [
              {
                "id": "CVE-2020-36316-28f9ddf1",
                "digest": {
                  "length": 3389,
                  "function_hash": "69657987524564636029535107011666586778"
                },
                "source": "https://github.com/relic-toolkit/relic/commit/76c9a1fdf19d9e92e566a77376673e522aae9f80",
                "target": {
                  "file": "src/cp/relic_cp_rsa.c",
                  "function": "pad_pkcs1"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2020-36316-8302b886",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "176999641168755905788768045896499671049",
                    "74783240671282190672271361349882345348",
                    "176723442613648384338233460164271321788",
                    "294432505293137735722343447872286710285",
                    "268162463894706134361579155470333805242",
                    "321495150006894071367042592449401519075",
                    "214031401099938154895451053399372112638",
                    "127589012025454628157139890586018595238",
                    "243469124743432876710305694229026463292",
                    "300746572558732625302601277932745638334",
                    "320946319132114463535112759167331362879",
                    "205831021259119913990990917088159697522",
                    "252014268913482632074802215439059149515",
                    "257853496364686983710324393625378027850",
                    "189487864189060317300793759766524930847",
                    "284105826758362605834986465567384060991",
                    "52090692321342227819024359639513987911",
                    "114639030673563402080214300261229884896",
                    "304263314638063041891213352202038779285",
                    "39861785282792548728985415521757370500",
                    "244227412663048728943245093838192530967",
                    "71728752278568053299011282484131662209",
                    "9619257733797698653810254936259396843",
                    "104344525641221576370228563130532433218",
                    "175562115085806860254177535346311373489",
                    "59230706511690997389992675793244113206",
                    "227188692718352635339371063222477520952",
                    "97329313909089951908811274292453467375",
                    "216542705124302817088270099936003884483",
                    "7733801303813526248160289426848155002",
                    "328449221763997800467760181019065561074",
                    "218203412603636142080969475454982524525",
                    "270327764936296466011869386410522672030",
                    "210444788085239497161001174539367366518",
                    "90787549932364645469273279741758775015",
                    "300746572558732625302601277932745638334",
                    "320946319132114463535112759167331362879",
                    "226814070907338472034763529982624929643",
                    "54918971806828564430054993294184776992",
                    "301992744173651404076094312165253960736",
                    "269792656340272394693323755228770874039",
                    "170205691752568514629617845835640033399",
                    "47355852448220394792452224727004069369",
                    "119366608951561752882182264989136692522",
                    "198417074384324357349202987187459479249",
                    "322362946218057680321036918247693849727",
                    "272244035529281744367980305555753917550",
                    "213945344902666604977809375415103803599",
                    "209167455294509237089794457863428978816",
                    "287184312953108992851729164489875176050",
                    "327887661744444931927532843055323241534",
                    "128124206666282504699246336781833592912",
                    "76751374439448529389163149803574416778",
                    "200913858063916283820781819286554577899",
                    "211127066634986981543305359363527596134",
                    "304635309418604517957519510608551965969",
                    "7894321107815600658076663106801253226",
                    "337937090123560802889907500474146544983",
                    "7733801303813526248160289426848155002",
                    "328449221763997800467760181019065561074",
                    "171889454677858464178211828575625335309",
                    "180420887284798950437313727720560900588",
                    "296111307738250841379025866185251011725",
                    "302264300492902588825628711671847858204",
                    "300746572558732625302601277932745638334",
                    "320946319132114463535112759167331362879",
                    "205298223151676794215434491056808616422",
                    "289993707613616582711170844224820509252",
                    "26413249731423351078136499886671689705",
                    "160201831558384465023785843521504997570",
                    "255725900331403741635168924668275238509",
                    "72581837716220785971618848568572098849",
                    "35315668242731255350762552698598400091",
                    "322362946218057680321036918247693849727",
                    "272244035529281744367980305555753917550",
                    "213945344902666604977809375415103803599",
                    "209167455294509237089794457863428978816",
                    "105034214953362783408502308416868602234",
                    "85913737826192494715055328516857859455",
                    "64364746907745766110979586499371220449",
                    "188303882651416551832955023848142725998",
                    "49856578034049736074515976149517332484",
                    "130824167586758441043959508569288646267",
                    "66842724665732391190425082872404537653",
                    "170253813911264833053462582744276479816",
                    "292236652567574037947994252553778083661",
                    "120876729164731549809202997316638063779",
                    "199394435634674866567242055102985135931",
                    "182745005759905572442083273786164856991",
                    "24781707224409083331040960408287212522",
                    "215283358236241977238920896003512114114",
                    "61614050452091119540422645748485453256",
                    "306583536893737000029851269848769272318",
                    "320150607994940572938272248983290202919",
                    "15134180967638900323861718133953687308",
                    "296439465565648027090670636487426479888",
                    "243469124743432876710305694229026463292",
                    "300746572558732625302601277932745638334",
                    "320946319132114463535112759167331362879",
                    "205298223151676794215434491056808616422",
                    "289993707613616582711170844224820509252",
                    "26413249731423351078136499886671689705",
                    "160201831558384465023785843521504997570",
                    "255725900331403741635168924668275238509",
                    "72581837716220785971618848568572098849",
                    "35315668242731255350762552698598400091",
                    "322362946218057680321036918247693849727",
                    "272244035529281744367980305555753917550",
                    "213945344902666604977809375415103803599",
                    "209167455294509237089794457863428978816",
                    "105034214953362783408502308416868602234",
                    "85913737826192494715055328516857859455",
                    "64364746907745766110979586499371220449",
                    "261701341931677118492060298693384616600",
                    "117890656568826634489406508483546722172",
                    "168376136586940594098937790231239496014",
                    "238650413656995295252595192573459174793",
                    "10750340649640760076361403465158419713",
                    "165012024259001614023802185594326443919",
                    "121492572671130122784650471332867952605",
                    "70490273072808449404062268570703512498",
                    "269209795681707323759010004915333506599",
                    "207286829737887128814527795832503072661",
                    "109637835553497115588404320925232073165",
                    "124468545309001644128594094944353125075",
                    "299302300648422506657645048957142279467",
                    "280144093763899184478457595848531999010",
                    "152680059064323343727092993452419090317",
                    "206083676834359748109628297345258602678",
                    "166667703683971233157485615823154502229",
                    "210444788085239497161001174539367366518",
                    "90787549932364645469273279741758775015",
                    "300746572558732625302601277932745638334",
                    "320946319132114463535112759167331362879",
                    "25269627289241787621911950337765394219",
                    "234937050599370577969708292249572046487",
                    "330413026544391919887176214065357229329",
                    "188251850176814347514767874960831439561",
                    "65838279688830444992923079735754019812",
                    "250878361377078107732954500086938751576",
                    "131853818338893323714798287105812091603",
                    "298806962622650548004846369877018418791",
                    "317102643014195284738754880516459938848",
                    "248759338387584458723015072947917441648",
                    "14287488217986540917784809502541996257",
                    "312523487972394540757881928640327280811",
                    "201550956021212177097337170644425459233",
                    "144883433740768842083807522848713276655",
                    "138859558927786835353471320257559087327",
                    "23487759313848855935911302672309400875",
                    "102043244297400863801477150328521982280",
                    "287163650037599372478469647268958949234",
                    "297768075006189979248577915518775610358",
                    "99622463887883867008085867385275345428",
                    "324127030554266084438738243156390887352",
                    "109075084179461499180415098764717190865",
                    "86421167764985328966239088122101460059",
                    "307418838073183411310024636374863059255",
                    "310818764764392458535163758673841261334",
                    "212840104574296776041054685751549932599",
                    "219738587724857660944345609151156113900",
                    "312071248794077163008262197777972682404",
                    "325166293912599666864549561987208489529",
                    "160778735977017232218986016224340348518",
                    "22891656523126685584826805503202320033",
                    "13906232039482189682070409789838485879",
                    "215668190286178593346030138564727223149",
                    "122646207475538770042261304263905049518",
                    "139620722898740386962990887842784614046",
                    "168727790042711549721944247229085790175",
                    "210134779933493444123736557387374184984",
                    "101715081394689386340354014849807365822",
                    "332492219159996433166634495415695110427",
                    "108016346379469167819287117233246947614",
                    "125607810941762582248483891676375339240",
                    "316826136710650014853972413978324473105",
                    "275430958428061754343176780872041303912",
                    "61828269043226109301554509474616012862",
                    "25644675370638697584473903991887263036",
                    "309259360367660227962573254798451602948",
                    "180049546802950243922820528270634788775",
                    "273637792419397168771378512923150504016",
                    "192093679031261623440745939823396907749",
                    "254084815848064005102609712688000594265",
                    "78102652975097323121998935950371673223",
                    "329226381178319742283366155930733701732",
                    "256589231376202743502277338265420444734",
                    "13246191208987843743498873102249772699",
                    "265595454929991588064977282964044299720",
                    "226795725697873164175353547701968536860",
                    "192885718503205617390512316928349408892",
                    "296627417928191517384351695197789373369",
                    "105579732344820945460523058662775526417",
                    "86340119241204720031038070763317896204"
                  ]
                },
                "source": "https://github.com/relic-toolkit/relic/commit/76c9a1fdf19d9e92e566a77376673e522aae9f80",
                "target": {
                  "file": "src/cp/relic_cp_rsa.c"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2020-36316-8fd68601",
                "digest": {
                  "length": 4151,
                  "function_hash": "51787330787286231467876970354556657624"
                },
                "source": "https://github.com/relic-toolkit/relic/commit/76c9a1fdf19d9e92e566a77376673e522aae9f80",
                "target": {
                  "file": "src/cp/relic_cp_rsa.c",
                  "function": "pad_pkcs2"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2020-36316-91dbdac7",
                "digest": {
                  "length": 909,
                  "function_hash": "321890480262879610976218098852809443603"
                },
                "source": "https://github.com/relic-toolkit/relic/commit/76c9a1fdf19d9e92e566a77376673e522aae9f80",
                "target": {
                  "file": "src/cp/relic_cp_rsa.c",
                  "function": "pad_basic"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-20T13:59:42Z"
          }
        }
      ],
      "modified": "2026-10-20T13:59:42.326985241Z",
      "provider": "osv",
      "references": [
        "https://github.com/relic-toolkit/relic/",
        "https://github.com/relic-toolkit/relic/tree/32eb4c257fc80328061d66639b1cdb35dbed51a2",
        "https://github.com/relic-toolkit/relic/commit/76c9a1fdf19d9e92e566a77376673e522aae9f80",
        "https://github.com/relic-toolkit/relic/issues/155"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:a:relic_project:relic:*:*:*:*:*:*:*:*"
            ],
            "vendor_product": "relic_project:relic",
            "extracted_events": [
              {
                "range": [
                  {
                    "fixed": "2021-04-03"
                  }
                ],
                "source": "CPE_RANGE"
              }
            ]
          },
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "fixed": "2021-04-03"
                  }
                ],
                "source": "DESCRIPTION"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2020-36316",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 388502,
  "published_at": "2021-04-07T21:15:15.933+00:00"
}